Build/Test Tools: Expand visual regression test coverage for admin pages.#10914
Build/Test Tools: Expand visual regression test coverage for admin pages.#10914josephfusco wants to merge 3 commits intoWordPress:trunkfrom
Conversation
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe 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
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
83cbdcd to
014f376
Compare
b741ba1 to
fff0a92
Compare
dceb479 to
1e6b718
Compare
1e6b718 to
11398ed
Compare
Simplifies `npm run test:visual` to run Playwright directly instead of routing through a shell script that managed git checkouts and environment setup. The CI workflow already handles automated trunk-vs-branch comparison.
Visual regression tests are intended for local use only, consistent with how they have historically operated in WordPress core.
Summary
Expands the existing visual regression test suite to cover 32 admin screens ahead of the WordPress 7.0 admin reskin. The tests capture full-page screenshots against baseline snapshots from trunk, making it easy to spot unintended visual changes as reskin CSS lands.
What changed:
screenshot.cssstylesheet, with per-page Playwrightmaskoptions for anything page-specific (e.g. auto-generated passwords on Add User, health check results on Site Health)npm run test:visualnow runs Playwright directly instead of through a wrapper scriptPages covered
Content: All Posts, Add New Post, Edit Post, All Pages, Categories, Tags, Comments, Media Library, Add Media
Appearance: Dashboard, Themes, Widgets, Menus, Plugins
Users: All Users, Add User, Your Profile
Settings: General, Writing, Reading, Discussion, Media, Permalink, Privacy
Tools: Available Tools, Import, Export, Export Personal Data, Erase Personal Data, Site Health, Updates
Other: Login (unauthenticated)
Testing
Prerequisites: Docker running,
npm ci, andnpx playwright install chromium.1. Generate baselines from trunk:
2. Compare a feature branch against those baselines:
Failures produce diff images in
artifacts/and an HTML report opens automatically.Trac ticket
https://core.trac.wordpress.org/ticket/64671