Re-add CLI integration test for creating a site from a custom Blueprint - #4124
Merged
Conversation
Collaborator
📊 Performance Test ResultsComparing a1bd855 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
Contributor
There was a problem hiding this comment.
Pull request overview
Re-introduces CLI end-to-end coverage for creating a site from a custom WordPress Blueprint, using the current CLI e2e harness and ensuring runs are isolated from a developer’s real Studio config/appdata.
Changes:
- Added a new
create-blueprint.e2e.test.tssuite coveringstudio site create --blueprintfor multiple Blueprint step types. - Updated the CLI e2e harness to also isolate the legacy Electron appdata directory via
E2E+E2E_APP_DATA_PATH.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| apps/cli/commands/site/tests/helpers/cli-e2e.ts | Ensures CLI e2e runs isolate legacy Electron appdata to avoid local failures due to pre-split appdata-v1.json. |
| apps/cli/commands/site/tests/create-blueprint.e2e.test.ts | Adds e2e tests that create sites from Blueprint files (theme/plugin install + runPHP + wp-cli). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Claude investigated the revert history and the current e2e harness, restored the test from git history, adapted it to the updated harness conventions, and verified all suites locally. I reviewed all changes.
Proposed Changes
PR #3961 added CLI e2e coverage for
studio site create --blueprint, but was reverted in #4029 as part of the AINFRA-2588 Windows E2E hang investigation. The actual causes were later found and fixed in #4082. The blueprint tests were not at fault, so this PR re-adds them, updated for the harness as it exists today:--runtime sandbox, matching the other CLI e2e suites: it keeps runs hermetic, since native PHP would download its binary into the isolated config dir on first run.--no-start, and since Add CLI e2e tests for site management (rename, PHP version, delete) #3989 each test env gets an isolated daemon — so teardown now runssite stop --allbefore removing the env, like the start/stop and site-management suites, to avoid orphaning a daemon per case.runCliisolates the legacy Electron appdata dir (E2E+E2E_APP_DATA_PATH). Without it, the Studio-compatibility startup migration finds a developer's real pre-splitappdata-v1.jsonand exits 1, failing every CLI e2e suite locally (CI passes only because agents have no legacy config). This also stops e2e runs from bumping production stats.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 --tagsFilter='!e2e'— the e2e cases are skipped.npm test -- apps/cli/commands/site/tests/create.e2e.test.ts --tagsFilter='e2e'(on a machine with a leftover~/Library/Application Support/Studio/appdata-v1.json, this fails without the harness change and passes with it).Pre-merge Checklist