Repository navigation
Repair wp/6.7 branch Actions: Fix flaky Openverse image drag-and-drop e2e test - #84041
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Size Change: 0 B Total Size: 1.77 MB ℹ️ View Unchanged
|
f22453f to
d844308
Compare
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
d844308 to
d5324be
Compare
d5324be to
8492a71
Compare
8492a71 to
0fa6851
Compare
0fa6851 to
cc07b40
Compare
cc07b40 to
7990089
Compare
7990089 to
8b8d941
Compare
Part of #82783.
What?
Mocks Openverse in
test/e2e/specs/editor/blocks/image.spec.js's "can be replaced by dragging-and-dropping images from the inserter" test.page.route()answers the search request toapi.openverse.orgwith two results on a fakeopenverse.testhost, and serves those two images fromtest/e2e/assets.Why?
The test dragged real Openverse search results onto an image block. When a result is dropped, the editor downloads the full-size image with
fetch()and uploads it to the media library. The first result is currently a NASA image hosted onlive.staticflickr.com, and on GitHub-hosted runners that download can fail withnet::ERR_FAILED(the same URL loads outside CI). Nothing is uploaded, and the image block stays empty.On this branch it failed
Playwright - 1on #83835 at 04:17 UTC on 2026-09-30, then passed on #83864 at 10:32 UTC the same day. The same failure broke the test ontrunk, which #83842 fixed. Mocking the search and the images removes the test's dependency on both services.How?
Ports #83842 from
trunk, with one change: the first mocked image is1024x768_e2e_test_image_size.jpeginstead of the 10×1010x10_e2e_test_image_green.png, which this branch doesn't have.On this branch, opening the inserter's Media tab zooms the canvas out (from 6.8 that only happens when there's a section root). With a 10×10 first image, the zoomed-out image block is only a few pixels tall, and its center sits under the in-between inserter's "Add pattern" button, so the second drag can't drop:
locator.dragTotimes out because the button intercepts pointer events. A large first image keeps the block tall, as the real Openverse photos did. Locally on this branch, the test with trunk's images failed 3 of 3 runs, and with this change passed 5 of 5.Use of AI Tools
This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.
🤖 Generated with Claude Code