Repository navigation
Repair wp/6.2 branch Actions: Migrate the Query block e2e test to Playwright - #84237
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.33 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. |
07602fa to
96efc51
Compare
96efc51 to
73d43da
Compare
|
Size Change: 0 B Total Size: 1.33 MB ℹ️ View Unchanged
|
Part of #82931.
What?
Backports #47995, which replaces the Puppeteer
packages/e2e-tests/specs/editor/blocks/query.test.jswith a Playwrighttest/e2e/specs/editor/blocks/query.spec.js, and adds therequestUtils.deleteAllPages()helper it uses.Why?
Query block › Query block insertion › ListfailedPuppeteer - 1on all three Jest attempts:The failure screenshots show the "Choose a pattern" modal closed and the Query Loop block still in its placeholder state, so the "Standard" pattern was never applied. The Puppeteer test clicks the pattern with an un-awaited
chosenPattern.click(), which clicks at the element's screen coordinates, and then waits for a rendered post date. If the pattern list's layout shifts while its previews load, the click can miss the pattern and the modal closes without inserting it.The Playwright version avoids both: its clicks wait for the element to be visible and stable, and it checks the inserted block tree (
editor.getBlocks()) instead of waiting for posts to render. Trunk never fixed the Puppeteer test; it was replaced by this migration shortly afterwp/6.2was cut.How?
Cherry-pick of 1e9c93b. One conflict, in
packages/e2e-test-utils-playwright/src/request-utils/index.ts: this branch doesn't have trunk's./menusimport, so only the newimport { deleteAllPages } from './pages';line is added. The other files apply unchanged. Every other Playwright helper the new test uses (editor.insertBlock(),editor.canvas,editor.getBlocks(),requestUtils.activatePlugin(),createPost(),deleteAllPosts()) already exists on this branch.wp/6.3and newer already have the Playwright test.wp/6.1,wp/6.0andwp/5.9have an older Puppeteer version with a different pattern modal, but no failures of it were found in their CI, so it is not backported there.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