Add CLI integration test for creating a site from a custom Blueprint#3961
Draft
gcsecsey wants to merge 4 commits into
Draft
Add CLI integration test for creating a site from a custom Blueprint#3961gcsecsey wants to merge 4 commits into
gcsecsey wants to merge 4 commits into
Conversation
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.
Related issues
How AI was used in this PR
I used Claude to review the existing Playwright blueprint tests and the new CLI e2e harness from #3947, plan the migration, and to write the test. I reviewd and verified all changes.
Proposed Changes
Blueprint coverage currently lives only in
apps/studio/e2e/blueprints.test.ts, which boots the entire desktop app through Playwright to create a site from a custom Blueprint and then inspects wp-admin — slow, flaky, and coupled to the UI. This continues the "Migrate Studio E2E tests to CLI" effort by exercising the same capability directly through the CLI.studio site create --blueprint <file>against an isolated config directory and asserts on the result: a site is created from a custom Blueprint, and the Blueprint's install steps land their files on disk. Because the Blueprint is applied during create even with--no-start, the test can verify real effects (a theme and a plugin installed) without booting a server. It covers four step types from the original suite — install theme, install plugin, run PHP, and WP-CLI.appdata-v1.jsonand abort the CLI on a developer's machine (it passed in CI only because CI starts clean). The harness now isolates that path too, which also fixes the siblingcreate.e2e.test.tslocally.Per the issue, activation/option-state assertions (which require reading the site's SQLite database) and error/validation cases are left as follow-ups, and the Playwright
blueprints.test.tsis kept for now.Testing Instructions
npm run cli:build.npm test -- apps/cli/commands/site/tests/create-blueprint.e2e.test.ts --tagsFilter='e2e'Confirm all four tests pass.
npm test -- apps/cli/commands/site/tests/create-blueprint.e2e.test.ts --tagsFilter='!e2e'The four tests are skipped.
npm test -- apps/cli/commands/site/tests/create.e2e.test.ts --tagsFilter='e2e'Pre-merge Checklist