Repository navigation
Tests: Scope the Classic media checkbox to the Media Library panel - #84520
lancewillett wants to merge 1 commit into
Conversation
🤖 PR meta 🤖🎉 PropsIf 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. Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 8.51 MB
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. refuses the drop and uploads nothing in
|
There was a problem hiding this comment.
🟢 Approval recommended
The targeted locator resolves the duplicate-match failure without weakening the assertion.
0 open findings
What changed in this PR
Scopes the Classic block media checkbox assertion to the Media Library panel, preventing Playwright strict-mode failures from duplicate matches.
Changes:
- Narrows the checkbox locator while preserving its checked-state assertion and timeout.
| File | Description |
|---|---|
test/e2e/specs/editor/blocks/classic.spec.js |
Scopes the uploaded-image checkbox lookup to the Media Library tabpanel. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Closing: #84524 merged the same change. |
What and why
Scope the Classic block E2E test's uploaded-image checkbox lookup to the Media Library tabpanel.
The page-wide lookup matches both the library item and its selection preview. Both are checked, but Playwright rejects the two matches with a strict-mode violation. This failed all three attempts in each of the four latest trunk E2E runs, and also affected an unrelated PR.
Example failing job. The failure is also noted on #84518.
Likely cause: WordPress core r64293 (#65852), committed October 10, now refreshes an attachment tile's
aria-labelon render, so the selection preview carries the file name too. This is inferred from the core diff, not observed in a browser. If so, this is test drift after an intentional core change, not a flake.The change preserves the checked-state assertion and its timeout. No production code changes.
Testing
Use of AI tools
AI assistance: OpenAI Codex (GPT-6), for CI log analysis, the selector change, local validation, and this description, under human direction. Anthropic Claude (Opus 5.5), as adversarial reviewer, including the likely-cause note above.