[wp-trac] [WordPress Trac] #61240: Add e2e test for maintenance mode and other edge cases
WordPress Trac
noreply at wordpress.org
Tue Jun 18 08:19:07 UTC 2024
#61240: Add e2e test for maintenance mode and other edge cases
--------------------------------------+-------------------------
Reporter: swissspidy | Owner: swissspidy
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.6
Component: Build/Test Tools | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-------------------------
Changes (by swissspidy):
* owner: (none) => swissspidy
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"58430" 58430]:
{{{
#!CommitTicketReference repository="" revision="58430"
Build/Test Tools: add new end-to-end tests for edge cases such as
maintenance mode.
Sometimes errors only occur in unusual code paths such as the maintenance
mode or installation screens. Due to lack of tests for these scenarios in
core, such errors are usually only noticed very late. This change adds new
end-to-end (e2e) tests to prevent regressions in the following areas:
- Maintenance mode (presence of a `.maintenance` file)
- Fatal error handler (simulated with an mu-plugin that causes an error)
- Installation screen (verifying full installation flow & that there are
no database errors)
Thanks to these tests, an issue was already found and addressed in the
default `wp_die` handler, as `wp_robots_noindex_embeds` and
`wp_robots_noindex_search` used to cause PHP warnings due to `$wp_query`
not existing.
In the future, these tests can be extended to also test scenarios like
localized error pages via `wp_load_translations_early()`.
Fixes #61240.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61240#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list