test: switch to a classic fixture theme instead of assuming one (#145) - #164
Merged
Conversation
The classic-theme playbook test read the host install's theme as a fixture. CI's fresh core ships only block themes, so it failed on every leg since 2026-08-21 while green locally. Both step-2 branches now switch to the fixture they mean. Closes #145 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ApYKEKcBnpuz8w6BX2agfH
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.
Closes #145
What
The classic-theme playbook test now switches to a classic fixture theme instead of assuming the host WordPress runs one. A block-theme fixture variant is pinned alongside it, so both branches of step 2 are tested on every machine.
Why
test_the_playbook_adapts_step_two_to_a_classic_themehas been red on every CI run since 2026-08-21, on all six matrix legs, while green locally. The test's own comment said "the test site runs a CLASSIC theme". That was an environment fact, not a fixture: the harness symlinkswp-content/themesfrom the host install, which on the developer's machine is a classic theme. CI provisions a fresh core whose bundled themes are all block themes, sowp_is_block_theme()was true and the playbook rendered the block-theme step 2.How
tests/fixtures/themes/saddle-classic-fixture/(style.css + index.php). Itsindex.phpand the absence oftemplates/index.html+theme.jsonare what makewp_is_block_theme()return false.with_theme()helper inskills-test.php, mirroring the register/switch/restore patternsite-editor-test.phpalready uses. Both classic-theme tests go through it; each asserts the fixture reads as the theme type it means before checking the playbook.test_the_playbook_sends_step_two_to_the_template_parts_on_a_block_themepins the other branch, using the existingsaddle-block-fixture. Passing on the developer's classic host proves the switch works in the direction CI needs.Testing
composer lint— 0 errors, the 3 pre-existing warningscomposer test— 654 tests (was 653), 1 pre-existing skip, locally