Skip to content

Fix site status toggle tests to use the current renderMainView signature - #4379

Merged
shaunandrews merged 1 commit into
trunkfrom
fix-site-status-toggle-test
Jul 29, 2026
Merged

Fix site status toggle tests to use the current renderMainView signature#4379
shaunandrews merged 1 commit into
trunkfrom
fix-site-status-toggle-test

Conversation

@shaunandrews

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

AI traced the failure to its origin, wrote the fix, and verified it. npm run typecheck and the affected suite were run locally and reviewed.

Proposed Changes

trunk is currently red on both Unit Tests and Lint. This fixes it.

Two PRs landed the same day and conflicted semantically rather than textually, so nothing blocked either one:

Git merged both cleanly — the two PRs touched different lines of the same file — but the calls no longer match the helper. { running: false } is now swallowed as the options object, siteOverrides falls back to {}, and the site under test stays running. One test then looks for a stopped-site toggle that was never rendered.

The second call site is worth noting: it fails typecheck but still passes, because that test sets starting and the pending label wins regardless of running. It was quietly asserting against a running site while reading as though it covered a stopped one. Both call sites now pass the override through properly, so that coverage is real again.

No production code changes — this is test-only, and the behavior #4374 shipped is unaffected.

Testing Instructions

  1. npm test -- apps/ui/src/components/site-dropdown/main-view.test.tsx — 9 passing.
  2. npm run typecheck — clean; on trunk it reports two TS2353 errors in this file.
  3. Confirm CI is green on both Unit Tests and Lint (the Lint job runs npm run lint followed by npm run typecheck, which is why one root cause turned two checks red).

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing ebc2e48 vs trunk

app-size

Metric trunk ebc2e48 Diff Change
App Size (Mac) 1375.40 MB 1375.40 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk ebc2e48 Diff Change
load 1109 ms 1063 ms 46 ms ⚪ 0.0%

site-startup

Metric trunk ebc2e48 Diff Change
siteCreation 6484 ms 6524 ms +40 ms ⚪ 0.0%
siteStartup 2388 ms 2397 ms +9 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

@shaunandrews
shaunandrews merged commit 427be4f into trunk Jul 29, 2026
14 checks passed
@shaunandrews
shaunandrews deleted the fix-site-status-toggle-test branch July 29, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants