Fix E2E suite failing on expired admin email confirmation - #30
Merged
Conversation
The database fixture bakes in a fixed `admin_email_lifespan` of 1785000678, which expired on 2026-07-25 17:31 UTC. Past that point WordPress redirects every admin login to `wp-login.php?action=confirm_admin_email`, which has no `#wpadminbar` and is not `/wp-admin/`, so the Playwright global setup timed out and the whole suite aborted before running a single test. Disable the check via the `admin_email_check_interval` filter. Core gates the redirect on `$admin_email_check_interval > 0 && time() > $admin_email_lifespan`, so returning 0 suppresses it regardless of the stored option value. Filtering rather than rewriting the timestamp in database.sql keeps this from re-arming on a future date, and survives a fixture re-export. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Playwright test resultsDetails
|
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.
Problem
The Playwright suite has been failing on
mainsince 27 July, but nothing in the plugin code broke — the fixture hit a time bomb.tests/e2e/database.sqlbakes in a fixedadmin_email_lifespanof1785000678, which expired at 2026-07-25 17:31 UTC. Once that timestamp passed, WordPress began redirecting every admin login to its "verify your admin email" screen:That page has no
#wpadminbarand isn't/wp-admin/, so thePromise.raceintests/e2e/global-setup.js:30timed out. Global setup threw and the suite aborted before running a single test.The timeline lines up exactly:
Both failing runs on
mainshow the identical error atglobal-setup.js:32("Failed to log in to WordPress"), so this is unrelated to the code in #25 and #29 — those were simply the next pushes after the clock ran out.Fix
Adds
tests/mu-plugins/disable-admin-email-confirmation.php:Core gates the redirect on
$admin_email_check_interval > 0 && time() > $admin_email_lifespan(wp-login.php:1401), so returning0disables the check entirely — independent of whatever timestamp the fixture holds.I chose the filter over rewriting the timestamp in
database.sqldeliberately: any new value would just re-arm the same bomb on a later date, and a fixture re-export would silently reintroduce it.tests/mu-pluginsis already mapped towp-content/mu-pluginsfor both the dev (8888) and test (8889) environments, and this follows the existing pattern offorce-elasticpress-available.php.Testing
302 → http://localhost:8889/wp-admin/(was redirecting toconfirm_admin_email).admin_email_lifespanis the only expiring timestamp in the fixture — also grepped for transient timeouts, none present.🤖 Generated with Claude Code