Pass test theme through to WPLoader in module CI#1061
Open
mikelittle wants to merge 2 commits into
Open
Conversation
The module-ci workflow already requires altis/test-theme and sets it as the CMS module's default-theme, but WPLoader reads its own `theme` value from extra.altis.modules.dev-tools.codeception.* in composer.json. With no value there, the dev-tools-command default of `theme: ''` reaches WPLoader, and wp-browser's `activatePluginsSwitchThemeInSeparateProcess()` casts the empty string to `[ '' ]` and tries to switch to a theme with an empty name, which WordPress resolves to a non-existent "default" theme directory and aborts the test bootstrap. Threading test-theme through to the WPLoader override gives the bootstrap a real theme to switch to. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Module CI runs (e.g. altis-core run 25849311914) fail during WPLoader bootstrap with:
The workflow already requires `altis/test-theme` and sets it as the CMS module's `default-theme` in `composer.json`, but WPLoader reads its own `theme` value from `extra.altis.modules.dev-tools.codeception.modules.config.WPLoader.theme`. Without a value there, the dev-tools-command default of `theme: ''` reaches WPLoader, and wp-browser's `activatePluginsSwitchThemeInSeparateProcess()` casts the empty string to `['']` and tries to switch to a theme with an empty name — WordPress resolves that to a non-existent "default" theme directory and aborts the test bootstrap.
dev-tools' own CI runs green because the caller `ci.yml` sets `test-command: phpunit`, which skips WPLoader entirely. All modules that use the default (`codecept`) hit this.
This extends the `jq` filter that writes the CMS default-theme to also write the WPLoader override under `extra.altis.modules.dev-tools.codeception`, so the merged codeception config picks up a real theme to switch to.
Test plan
🤖 Generated with Claude Code