Repository navigation
Repair wp/6.5 branch Actions: Fix flaky Openverse image drag-and-drop e2e test - #83621
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.72 MB ℹ️ View Unchanged
|
|
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. |
c3db9cc to
1d86d95
Compare
1d86d95 to
d2d6ebe
Compare
d2d6ebe to
2f00769
Compare
2f00769 to
762561c
Compare
762561c to
7a63c8e
Compare
7a63c8e to
77eeed4
Compare
Part of #82928.
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.engineeringwith two results on a fakeopenverse.testhost, and serves those two images fromtest/e2e/assets. It also addstest/e2e/assets/10x10_e2e_test_image_green.png, one of the two images, which this branch doesn't have yet.Why?
The test dragged real Openverse search results onto an image block, so it depended on two outside services. It failed intermittently with
TimeoutError: locator.dragTo: Timeout 10000ms exceededwhen the search results were slow or missing. When a result is dropped, the editor also downloads the full-size image withfetch(), and since 2026-09-30 GitHub-hosted runners intermittently fail to fetch thelive.staticflickr.comimage Openverse currently returns first (net::ERR_FAILED), which leaves the image block empty. Mocking the search and the images removes both dependencies.How?
Ports #83842, which fixes the same test on
trunk, with one change: this branch calls the olderapi.openverse.engineeringaddress (it now redirects toapi.openverse.org), andpage.route()only intercepts a request's original URL, so the pattern namesapi.openverse.engineering. Prettier wraps that longer call differently. The green image is copied fromtrunk, where #75483 added it.This PR previously carried a longer mock written for this branch before #83842 existed. It now uses
trunk's version, so everywp/X.Ybranch has the same fix.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