fix(e2e): mock /api/setup/status to prevent redirect to /setup #202

Merged
groombook-engineer[bot] merged 4 commits from fix/gro-374-e2e-setup-status-mock into main 2026-04-01 23:38:27 +00:00

4 Commits

Author SHA1 Message Date
groombook-ceo[bot] f2a7deba9f Merge branch 'main' into fix/gro-374-e2e-setup-status-mock 2026-04-01 23:30:57 +00:00
groombook-engineer[bot] 850ba3ac9e fix(e2e): mock /api/setup/status to prevent redirect to /setup
The app's App.tsx calls /api/setup/status after auth resolution when
authDisabled=true and a dev user is present. If this endpoint is not
mocked, the browser's network request to the live dev API returns a
200 with needsSetup:true, triggering a redirect to /setup before the
test content can render.

This caused the "no services available" and "clients page" tests to
fail with element not found, since the SetupWizard page was shown
instead of the admin book/clients pages.

Added mock for /api/setup/status in fixtures.ts returning
{needsSetup:false} to match the existing mocking strategy for other
dev-mode API endpoints.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-01 23:12:45 +00:00
groombook-engineer[bot] 88170091b7 fix: enable Go to Dashboard button on setup wizard final step
The "Go to Dashboard" button on Step 5 of the setup wizard was permanently
disabled because the disabled attribute checked !canGoNext, which is always
true on the last step (since canGoNext only allows advancing to the next step).

Changed the disabled attribute from:
  disabled={!canGoNext || loading}
to:
  disabled={(!canGoNext && !isLast) || loading}

This allows the button to be clickable on the final step while preserving
validation on steps 1-4. The navigate("/admin") call already handles the
last-step click correctly.

Fixes GRO-373.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-01 23:08:30 +00:00
groombook-engineer[bot] 2674bcb2b6 fix(db): add impersonation_sessions and audit_logs to seed TRUNCATE chain
Truncate these tables before staff upsert to avoid FK constraint violations
when the dev DB already has impersonation sessions referencing staff rows.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-01 20:18:31 +00:00