Skip to content

Build/Test Tools: Disable login autofocus during 6.3 E2E tests - #13942

Open
lancewillett wants to merge 1 commit into
WordPress:6.3from
lancewillett:fix/6.3-e2e-login-autofocus
Open

lancewillett wants to merge 1 commit into
WordPress:6.3from
lancewillett:fix/6.3-e2e-login-autofocus

Conversation

@lancewillett

@lancewillett lancewillett commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

WordPress 6.3’s delayed login autofocus can clear a typed password. Required-field validation then blocks submission, so the legacy E2E helper times out waiting for navigation.

Use the existing enable_login_autofocus filter in a temporary must-use plugin, following Gutenberg #6129. The runner respects LOCAL_DIR, preserves existing plugins, and removes its own fixture after completion or interruption.

Trac ticket: #58592, as a 6.3 follow-up to the timeout investigation closed after 6.4 moved to Playwright.

Validation:

  • Production build, explicit JavaScript lint, PHP syntax, and local WordPress style checks passed. Hosted Core coding standards and PHP compatibility checks also passed.
  • Quick Draft and Cache Control: 4/4 tests passed with SCRIPT_DEBUG enabled and 4/4 disabled, using Node 14 and Chromium revision 982053.
  • Ten runner lifecycle checks passed. Live HTTP checks confirmed autofocus was restored afterward and required-field validation stayed enabled.

All 24 executed hosted checks passed. The full E2E suite passed 16/16 tests with SCRIPT_DEBUG enabled and 16/16 disabled. Assertions, timeouts, and retries remain unchanged.

AI assistance: Codex assisted with investigation, implementation, review, and local validation.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Delayed login autofocus can clear a password after automated typing.
Required-field validation then prevents the navigation the helper awaits.

Install the existing autofocus filter as a temporary E2E must-use plugin,
following Gutenberg's test fixture. Remove the runner's own copy after
completion or interruption, preserving existing plugins.

See #58592.
@github-actions

github-actions Bot commented Oct 2, 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. You can also manually ask me to refresh this list by adding the props-bot label.

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.

@lancewillett
lancewillett requested review from a team and a balanced review from Copilot October 2, 2026 19:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation is focused, preserves existing plugins, and handles normal and interrupted cleanup correctly.

Review effort: Balanced
Findings: None

What changed in this PR

Disables delayed login autofocus during WordPress 6.3 E2E runs and reliably cleans up the temporary fixture.

Changes:

  • Adds a temporary must-use plugin that disables login autofocus.
  • Updates the runner to preserve arguments, forward signals, and clean up the fixture.
  • Documents fixture behavior and external-installation usage.
File Description
tests/​e2e/​run-tests.js Manages the fixture and test subprocess lifecycle.
tests/​e2e/​mu-plugins/​README.md Documents installation and cleanup behavior.
tests/​e2e/​mu-plugins/​disable-login-autofocus.php Disables login autofocus through the existing filter.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants