Skip to content

CLI test: add HTTP response check for created site - #4000

Merged
gavande1 merged 11 commits into
trunkfrom
stu-1867-verify-http-200-create-e2e
Jul 9, 2026
Merged

CLI test: add HTTP response check for created site#4000
gavande1 merged 11 commits into
trunkfrom
stu-1867-verify-http-200-create-e2e

Conversation

@gavande1

@gavande1 gavande1 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Claude was used to write the code and explore the solution. The author reviewed it manually.

Proposed Changes

Follow-up to the CLI e2e tests in #3947. The site create test only asserted persisted state on disk. This adds a real check: after creating and starting a site, the test requests its homepage and confirms a 200 with HTML, so it now fails if a created site cannot be served.

This does not cover the custom-domain and HTTPS case, which cannot run in an isolated, headless test. See the discussion in #3947.

Testing Instructions

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

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@gavande1 gavande1 changed the title Verify the created site serves its homepage in the CLI e2e test Jun 30, 2026
@gavande1
gavande1 requested a review from gcsecsey June 30, 2026 08:48
@gavande1
gavande1 marked this pull request as ready for review June 30, 2026 08:49
@wpmobilebot

wpmobilebot commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing a5108d1 vs trunk

app-size

Metric trunk a5108d1 Diff Change
App Size (Mac) 1411.92 MB 1411.92 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk a5108d1 Diff Change
load 1104 ms 1091 ms 13 ms ⚪ 0.0%

site-startup

Metric trunk a5108d1 Diff Change
siteCreation 6477 ms 6471 ms 6 ms ⚪ 0.0%
siteStartup 2389 ms 2392 ms +3 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

@gavande1
gavande1 requested a review from fredrikekelund July 1, 2026 05:36
Comment thread apps/cli/commands/site/tests/create.e2e.test.ts

@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.

Thanks for adding the HTTP checks @gavande1! 🙌

The new tests are working well:
Image

And they're skipped when filtered out as expected:
Image

I added a note about the PHP binary being available on CI.

@gavande1
gavande1 merged commit f353994 into trunk Jul 9, 2026
11 checks passed
@gavande1
gavande1 deleted the stu-1867-verify-http-200-create-e2e branch July 9, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants