Repository navigation
Build/Test Tools: Cover replacing an installed theme with an uploaded version - #15970
huzaifaalmesbah wants to merge 1 commit into
Conversation
… version. Add an E2E test that uploads a newer version of the fixture theme, checks the version comparison on the "already installed" screen, replaces the installed theme, and verifies the new version through REST. Add a 2.0 theme fixture and move the shared upload steps into a helper. Follow-up to r64624. See #54334.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the theme-replacement test coverage and shared upload helper.
No open issues 🎉
What changed in this PR
Adds end-to-end coverage for replacing an installed WordPress theme with an uploaded newer version, extending the existing theme management tests.
Changes:
- Tests the replacement workflow, checking the installed/uploaded version comparison and confirming version
2.0through the REST API. - Extracts shared upload steps into an
uploadTheme()helper. - Updates fixture documentation with a script to reproduce both theme versions.
| File | Description |
|---|---|
tests/e2e/specs/themes.test.js |
Adds the replacement test and reuses a shared upload helper. |
tests/e2e/assets/e2e-test-theme.md |
Documents the 2.0 fixture and generation of both archives. |
Review effort: Balanced
|
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: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
lancewillett
left a comment
There was a problem hiding this comment.
Thanks, @huzaifaalmesbah. Approving at 30a4a82.
- The documented script rebuilds both archives byte-identical, and the 1.0 archive is unchanged from trunk.
- The heading, the
Version 1.0 2.0row and the "Replace installed with uploaded" link matchTheme_Installer_Skinin trunk. - CI: the serial E2E jobs run 15 tests against trunk's 14, so the new test runs there, and everything passed with no retries.
This completes https://core.trac.wordpress.org/ticket/54334: r64624 covered the plugin half. #1813 can close when this lands.
AI review · claude-opus-5-5
|
PR #15970 landed in https://core.trac.wordpress.org/changeset/65520 |
… version. Upload a newer version of the fixture theme over the installed one, replace it, and verify the new version through REST. A second ZIP fixture holds the newer version. Follow-up to [64624]. Developed in: #15970 Props huzaifaalmesbah, justinahinon, juhise. Fixes #54334. git-svn-id: https://develop.svn.wordpress.org/trunk@65520 602fd350-edb4-49c9-b593-d223f7449a82
… version. Upload a newer version of the fixture theme over the installed one, replace it, and verify the new version through REST. A second ZIP fixture holds the newer version. Follow-up to [64624]. Developed in: WordPress/wordpress-develop#15970 Props huzaifaalmesbah, justinahinon, juhise. Fixes #54334. Built from https://develop.svn.wordpress.org/trunk@65520 git-svn-id: http://core.svn.wordpress.org/trunk@64593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
… version. Upload a newer version of the fixture theme over the installed one, replace it, and verify the new version through REST. A second ZIP fixture holds the newer version. Follow-up to [64624]. Developed in: WordPress#15970 Props huzaifaalmesbah, justinahinon, juhise. Fixes #54334. git-svn-id: https://develop.svn.wordpress.org/trunk@65520 602fd350-edb4-49c9-b593-d223f7449a82
Description
Adds an E2E test for replacing an installed theme with an uploaded newer version. The test uploads
e2e-test-theme-2.0.zipover the installed 1.0 fixture, checks the version row on the "This theme is already installed." screen, clicks "Replace installed with uploaded", and verifies the new version through the REST API.It also adds the 2.0 theme fixture (documented in
tests/e2e/assets/e2e-test-theme.md, the 1.0 archive is regenerated byte-identical by the same script) and moves the shared upload steps into anuploadTheme()helper.Follow-up to r64624, which added the same coverage for plugins.
Testing Instructions
npm run env:startnpm run test:e2e -- tests/e2e/specs/themes.test.jse2e-test-theme.zipinstead ofe2e-test-theme-2.0.zipin the new test: it fails on theVersion 1.0 2.0row.Trac ticket: https://core.trac.wordpress.org/ticket/54334
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Brainstorming edge-case scenarios and drafting test boilerplate; test architecture, assertions, and local E2E verification were written and validated by me.