Repository navigation
Add a Docker-free runner for the Playwright specs using WordPress Playground - #189
Merged
Merged
Conversation
Runs the existing Playwright specs against Playground when Docker is unavailable. wp-env stays the CI runtime.
This was referenced Oct 24, 2026
Contributor
|
Released in Blockstudio 7.7.9 as optional contributor tooling, with explicit-spec and site-identity guards, SDK-managed shutdown, and a passing CI smoke check. The full CI suites still use wp-env. Thanks for the contribution. |
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.
Contributors without Docker cannot run the Playwright specs locally, because they only run against wp-env. This adds an opt-in runner on WordPress Playground. wp-env stays the CI runtime and is untouched, as are the Playwright configs.
scripts/playground.ts:npm run test:e2e:playground -- <specs>starts a fresh Playground site, seeds it through the existing E2E endpoint, runsplaywright.wp-env.config.tsand stops the server.npm run playground:startkeeps a seeded site on :8888.tests/wp-env/.wp-env.json. The Blueprint activates the plugin and thethemetest theme and sets/%postname%/permalinks. PHP 8.4 and latest WordPress by default (PLAYGROUND_PHP,PLAYGROUND_WP); the versions live in the Blueprint because Playground ignores--phpand--wponce a Blueprint is passed. The site URL ishttp://localhost:8888, which the specs expect.vendor/autoload.php) and oftests/theme(Timber) are installed on first run.@wp-playground/cliis pinned to 3.1.60 as a devDependency (stable binary path, clean shutdown). The lockfile already had 3.0.46 through@wordpress/env; the diff is that subtree moving to 3.1.60.Why not
wp-env start --runtime=playground: it runs an unpinnednpx @wp-playground/clion PHP 8.2, does not activate the test theme, does not seed and does not set the site URL, so the specs cannot run on it as is.Limits compared to wp-env: SQLite instead of MySQL, one site only (no PHPUnit, empty or implementation environments), no WP-CLI, so
tests/e2e/cli.tsandtests/e2e/seo.tsstill need wp-env. It is meant for focused specs; CI remains the source of truth. In our runs the first run right after a freshnpm run buildsometimes failed in the firstbeforeAlland the next run passed with the same files.Tests:
repeater/minimized,repeater/confirmation,repeater/default-rows,types/textandtypes/textarea(49 tests), five times from a fresh site: four runs 49/49, one failure in the first test'sbeforeAll. Lint, format, audit:tooling, typecheck and the new unit test pass.