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