Skip to content

Add CLI integration test for site create (custom name, domain, HTTPS)#3947

Merged
gavande1 merged 3 commits into
trunkfrom
stu-1867-add-cli-create-e2e-test
Jun 26, 2026
Merged

Add CLI integration test for site create (custom name, domain, HTTPS)#3947
gavande1 merged 3 commits into
trunkfrom
stu-1867-add-cli-create-e2e-test

Conversation

@gavande1

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Proposed Changes

The end-to-end suite drives every site action through the Studio UI, which is slow, flaky, and ties coverage to the UI. This adds the first real CLI integration test for studio site create: it runs the actual command against an isolated config directory and asserts on the persisted result, covering a site with a custom name and a site with a custom domain plus HTTPS. The tests are tagged e2e so they run in the slower release or manual suite rather than on every pull request.

Testing Instructions

  1. Build the CLI with npm run cli:build.
  2. Run npm test -- --tagsFilter='e2e' and confirm both tests pass.
  3. Run npm test -- --tagsFilter='!e2e' and confirm these tests are skipped, so the fast suite is unaffected.

Pre-merge Checklist

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

@gcsecsey gcsecsey marked this pull request as ready for review June 25, 2026 11:35
@gcsecsey gcsecsey requested a review from fredrikekelund June 25, 2026 11:35

@gcsecsey gcsecsey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice work @gavande1, spawning the CLI and asserting against files on disk is a good direction for these tests IMO.

The two tests cases added here LGTM, and we can add more incrementally as needed.

Comment thread apps/cli/commands/site/tests/helpers/cli-e2e.ts
@gavande1 gavande1 disabled auto-merge June 26, 2026 07:01
@gavande1 gavande1 enabled auto-merge (squash) June 26, 2026 07:03
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing ed958ee vs trunk

app-size

Metric trunk ed958ee Diff Change
App Size (Mac) 1315.48 MB 1315.48 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk ed958ee Diff Change
load 1047 ms 1043 ms 4 ms ⚪ 0.0%

site-startup

Metric trunk ed958ee Diff Change
siteCreation 6479 ms 6469 ms 10 ms ⚪ 0.0%
siteStartup 7005 ms 6983 ms 22 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

@gavande1 gavande1 merged commit 21f7d1a into trunk Jun 26, 2026
11 checks passed
@gavande1 gavande1 deleted the stu-1867-add-cli-create-e2e-test branch June 26, 2026 07:18
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.

3 participants