Repository navigation
Repair wp/5.9 branch Actions: Retry detached menu item clicks in the Widgets Customizer e2e tests - #682
Closed
desrosj wants to merge 1 commit into
Conversation
desrosj
added this pull request to stack #668
October 8, 2026 03:20
desrosj
force-pushed
the
fix-actions-5.9/fix-flaky-customizer-inspector-test
branch
from
October 8, 2026 04:41
69f1852 to
1cf2ec9
Compare
desrosj
force-pushed
the
fix-actions-5.9/fix-flaky-customizer-inspector-test
branch
from
October 8, 2026 18:17
1cf2ec9 to
8777c3f
Compare
…en the menu item is detached.
desrosj
removed this pull request from stack #668
October 8, 2026 19:35
desrosj
force-pushed
the
fix-actions-5.9/fix-flaky-customizer-inspector-test
branch
from
October 8, 2026 19:35
8777c3f to
0e1d892
Compare
desrosj
added this pull request to stack #695
October 8, 2026 19:35
desrosj
marked this pull request as ready for review
October 9, 2026 16:40
|
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. |
Owner
Author
|
Moved to WordPress#84426. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Adds a
clickMenuItem()helper to the Widgets Customizer e2e tests (packages/e2e-tests/specs/widgets/customizing-widgets.test.js) and uses it for the three "Show more settings" clicks in the block toolbar's Options menu. The helper finds the menu item and clicks it. If the click fails because the element was detached, it reopens the Options menu if the menu closed, finds the item again and retries, up to three attempts in total. Any other error is thrown as before.Why?
Widgets Customizer › should open the inspector panelfails intermittently on this branch withNode is detached from documentatshowMoreSettingsButton.click(): https://github.com/desrosj/gutenberg/actions/runs/37718246276/job/113119651984 ("Admin - 4"). The test finds the menu item withfind(), then clicks the returned element handle, and the Options menu can re-render in between, so the click targets a node that is no longer in the document. Across 36Admin - 4jobs on this stack between 2026-10-06 and 2026-10-08, it failed on every attempt in 13 and passed only on a retry in 8.Trunk has no Puppeteer fix to backport. These tests were moved to Playwright in WordPress#39540 (WordPress@9f5b842), whose locators look the element up again when clicking.
wp/5.9has no Playwright e2e setup, so this does the same thing within the Puppeteer test.How?
clickMenuItem( name )callsfind( { role: 'menuitem', name } )and.click()in a loop, and only retries when the error message contains "detached". Before a retry, if no[role="menu"]is open, it shows the block toolbar and clicks "Options" again, because the re-render that detaches the item can also close the menu. The test steps and assertions are unchanged.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