Skip to content

Add CLI integration test for creating a site from a custom Blueprint#3961

Merged
gcsecsey merged 6 commits into
trunkfrom
stu-1871-migrate-blueprints-tests
Jun 29, 2026
Merged

Add CLI integration test for creating a site from a custom Blueprint#3961
gcsecsey merged 6 commits into
trunkfrom
stu-1871-migrate-blueprints-tests

Conversation

@gcsecsey

@gcsecsey gcsecsey commented Jun 25, 2026

Copy link
Copy Markdown
Member

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 PR continues the "Migrate Studio E2E tests to CLI" effort by exercising the same capability directly through the CLI.

  • Adds integration tests that run studio site create --blueprint <file> against an isolated config directory and asserts on the file system.
  • Closes a gap in the Add CLI integration test for site create (custom name, domain, HTTPS) #3947 harness: the helper isolated the config directory but not the legacy Electron appdata directory, so the Studio-compatibility startup migration could find a real pre-split appdata-v1.json and abort the CLI on a developer's machine. The harness now also isolates that path, which fixes the sibling create.e2e.test.ts locally.

Testing Instructions

  1. Build the CLI: npm run cli:build.
  2. Run the new suite (needs a network connection for the download install step):
    npm test -- apps/cli/commands/site/tests/create-blueprint.e2e.test.ts --tagsFilter='e2e'
    Confirm all four tests pass.
  3. Confirm the fast suite is unaffected:
    npm test -- apps/cli/commands/site/tests/create-blueprint.e2e.test.ts --tagsFilter='!e2e'
    The four tests are skipped.
  4. Regression check for the harness fix — confirm the sibling test also passes:
    npm test -- apps/cli/commands/site/tests/create.e2e.test.ts --tagsFilter='e2e'

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

Base automatically changed from stu-1867-add-cli-create-e2e-test to trunk June 26, 2026 07:18
# Conflicts:
#	apps/cli/commands/site/tests/helpers/cli-e2e.ts
@gcsecsey gcsecsey requested review from a team and gavande1 June 26, 2026 16:45
@gcsecsey gcsecsey marked this pull request as ready for review June 26, 2026 16:45

@epeicher epeicher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gcsecsey for adding those tests! I have tested the changes locally, and they work as expected.

Image

For the E2E test failures, I think these changes need the following PR to be merged: #3985. Once that PR is merged and rebased onto this one, if the E2E passes, these can be merged. I am accepting this to unblock you from that. Changes LGTM!

@gavande1 gavande1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. LGTM.

@gcsecsey

Copy link
Copy Markdown
Member Author

Thanks for the reviews @epeicher and @gavande1! 🙌 #3985 is merged now, so I pulled in the latest trunk, I'll proceed with merging once CI is green.

@gcsecsey gcsecsey enabled auto-merge (squash) June 29, 2026 11:11
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing a0aa66d vs trunk

app-size

Metric trunk a0aa66d Diff Change
App Size (Mac) 1315.58 MB 1315.58 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk a0aa66d Diff Change
load 1079 ms 1088 ms +9 ms ⚪ 0.0%

site-startup

Metric trunk a0aa66d Diff Change
siteCreation 6543 ms 6505 ms 38 ms ⚪ 0.0%
siteStartup 6555 ms 6977 ms +422 ms 🔴 6.4%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@gcsecsey gcsecsey merged commit 8f3364f into trunk Jun 29, 2026
11 checks passed
@gcsecsey gcsecsey deleted the stu-1871-migrate-blueprints-tests branch June 29, 2026 11:49
gcsecsey pushed a commit that referenced this pull request Jul 1, 2026
…) (#4029)

## Related issues

- Reverts #3961
- Reverts #4008

## Proposed Changes

Reverts two previously merged changes, combined into a single PR:

- **#3961** — removes the CLI integration test for creating a site from
a custom Blueprint, along with the appdata-isolation changes it made to
the e2e harness.
- **#4008** — re-enables the Windows Studio E2E Buildkite job, which had
been temporarily disabled.

The unrelated `STUDIO_PROCESS_MANAGER_HOME` env addition introduced by
#3989 is preserved in the e2e helper.

## Testing Instructions

- Confirm CI passes, including the re-enabled Windows E2E job.

## Pre-merge Checklist

- [x] Have you checked for TypeScript, React or other console errors?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants