From 84d31a195d688c4165413bf7df64caae0d6782c0 Mon Sep 17 00:00:00 2001 From: Mike Little Date: Thu, 14 May 2026 11:09:41 +0100 Subject: [PATCH 1/2] Pass test theme through to WPLoader 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) --- .github/workflows/module-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/module-ci.yml b/.github/workflows/module-ci.yml index 661723f..aaf3af8 100644 --- a/.github/workflows/module-ci.yml +++ b/.github/workflows/module-ci.yml @@ -118,8 +118,10 @@ jobs: # Install Altis test theme. composer require altis/test-theme --ignore-platform-req=php+ --ignore-platform-req=ext-* - # Mark the test theme as the default. - jq '. * {"extra":{"altis":{"modules":{"cms":{"default-theme":"test-theme"}}}}}' composer.json > composer.json.tmp + # Mark the test theme as the default for the CMS module, and pass it through to + # wp-browser's WPLoader so the test bootstrap switches to a real theme rather than + # tripping over the default empty `theme` string. + jq '. * {"extra":{"altis":{"modules":{"cms":{"default-theme":"test-theme"},"dev-tools":{"codeception":{"modules":{"config":{"WPLoader":{"theme":"test-theme"}}}}}}}}}' composer.json > composer.json.tmp mv composer.json.tmp composer.json # Use GitHub as the source for test to avoid packagist lag causing a race condition From e012b3c1b21093a53f76e0374f8304f3a31adc07 Mon Sep 17 00:00:00 2001 From: Mike Little Date: Thu, 14 May 2026 11:14:13 +0100 Subject: [PATCH 2/2] Trim inline comment Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/module-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/module-ci.yml b/.github/workflows/module-ci.yml index aaf3af8..e3d6ac5 100644 --- a/.github/workflows/module-ci.yml +++ b/.github/workflows/module-ci.yml @@ -118,9 +118,7 @@ jobs: # Install Altis test theme. composer require altis/test-theme --ignore-platform-req=php+ --ignore-platform-req=ext-* - # Mark the test theme as the default for the CMS module, and pass it through to - # wp-browser's WPLoader so the test bootstrap switches to a real theme rather than - # tripping over the default empty `theme` string. + # Mark the test theme as the default for the CMS module. jq '. * {"extra":{"altis":{"modules":{"cms":{"default-theme":"test-theme"},"dev-tools":{"codeception":{"modules":{"config":{"WPLoader":{"theme":"test-theme"}}}}}}}}}' composer.json > composer.json.tmp mv composer.json.tmp composer.json