Skip to content

Build/Test Tools: Wait for menu saves in the classic menus E2E test. - #15772

Closed
lancewillett wants to merge 1 commit into
WordPress:trunkfrom
lancewillett:e2e/classic-menus-wait-for-save
Closed

lancewillett wants to merge 1 commit into
WordPress:trunkfrom
lancewillett:e2e/classic-menus-wait-for-save

Conversation

@lancewillett

Copy link
Copy Markdown
Member

The classic menus "creates a menu, adds a custom link, and assigns it to a location" test passed only on retry in 7 of the 216 parallel E2E jobs that finished on November 6. It moved on before each save had finished loading, in two places.

What

  1. After Create Menu (5 of 7 retries): the test checked that the Menu Name field showed "E2E Menu". The test had typed that value itself, so the check could pass on the create form before the page reloaded. The next step clicked Custom Links on the create form (?action=edit&menu=0, side panels disabled) and timed out waiting for the URL field. The test now waits for the redirect to ?menu=<id> first.
  2. After Save Menu (2 of 7 retries): the test polled REST for the saved location. The server can save before the browser finishes loading the response, so the next page.goto( '/' ) failed with "interrupted by another navigation". The test now waits for the "E2E Menu has been updated." notice, which only the saved page shows.

Evidence

First-attempt errors from the retried jobs:

  • locator.fill: Timeout 10000ms exceeded, waiting for getByRole('textbox', { name: 'URL' }): runs 42146221073, 42215459048, 42218822487, 42256787659, 42277031851.
  • page.goto: Navigation to "http://localhost:8889/" is interrupted by another navigation: runs 42162810740, 42193906832.

No local reproduction; the cause is inferred from the errors and the nav-menus.php redirects.

Trac ticket: https://core.trac.wordpress.org/ticket/66455

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Scanning CI logs, finding the cause, writing the change and this description.

🤖 Generated with Claude Code

The "creates a menu" test moved on before each save had finished loading, in two places:

1. After Create Menu, it checked that the Menu Name field showed "E2E Menu". The test had typed that value itself, so the check could pass on the create form before the page reloaded. The next step then clicked Custom Links on the create form, where the side panels are disabled, and timed out waiting for the URL field.
2. After Save Menu, it polled REST for the saved location. The server can save before the browser finishes loading the response, so the next `page.goto( '/' )` was interrupted by that navigation.

The test now waits for the redirect to the new menu's edit screen, and for the "has been updated" notice after saving.

See #66455.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props lancewillett.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

wporg-sync pushed a commit that referenced this pull request Nov 9, 2026
Developed in: #15772

Props adrianmoldovanwp.
See #66455.


git-svn-id: https://develop.svn.wordpress.org/trunk@65348 602fd350-edb4-49c9-b593-d223f7449a82
@lancewillett

Copy link
Copy Markdown
Member Author

@github-project-automation github-project-automation Bot moved this from In review to Done in WordPress Project Build Tooling Nov 9, 2026
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants