fix(ci): Job names + test(e2e): add E2E test suite for portal auth regressions #189

Closed
groombook-engineer[bot] wants to merge 6 commits from fix/gro-300-dev-client-portal-auth into main

6 Commits

Author SHA1 Message Date
Barkley Trimsworth 7d1ff1f895 fix(tests): prevent staff redirect loop and fix async test handling
- Add guard to staff redirect to skip redirect if already on /admin route
  This prevents <Navigate to="/admin"> from firing when already at /admin,
  which was causing the admin layout to not render in tests
- Wrap renderApp() in act() to properly flush vi.fn() mock state updates
- Use queryAllByText instead of getByText for nav link checks to handle
  duplicate text elements (nav links vs page headings)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 20:11:09 +00:00
Barkley Trimsworth caa7d977f7 fix(ci): add deploy-version annotation to migration/seed Jobs (GRO-311)
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 19:27:20 +00:00
Barkley Trimsworth 3b04f374b8 fix(portal): fix isInitializing race condition causing premature redirect
setIsInitializing(false) was in .finally() which fires BEFORE the
outer .then() chain completes, causing redirect to fire before
setSession was called. Now setIsInitializing(false) is called
explicitly inside success/error handlers after setSession completes.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 19:24:05 +00:00
Barkley Trimsworth 49bfd8aea9 test(e2e): add Playwright E2E test suite for critical user journeys
Add 5 new E2E test files covering portal auth, data integrity, services deduplication, reports, and console health. These tests run against the Docker Compose stack with mocked API responses.

Gro-306 corrective action: automated regression tests to catch portal auth bugs before UAT.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 19:18:21 +00:00
Barkley Trimsworth b0ab41bb4e fix(portal): redirect unauthenticated users to /login
CustomerPortal now redirects to /login after session init completes
with no valid session, preventing portal chrome from rendering for
unauthenticated users. Dashboard !sessionId branch uses Navigate
redirect instead of dead-end UI. Staff redirect in App.tsx verified.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 19:12:38 +00:00
Barkley Trimsworth 01cb8d87a0 fix(ci): update migrate/seed Job names with SHA in image-tag PRs
Since Kubernetes Job spec.template is immutable, Flux cannot update a
completed Job with a new image tag. This change ensures the CI workflow
updates both the image newTag AND the Job metadata.name to include the
short SHA (e.g., migrate-schema-026a2c8), making each deploy's Job
unique and allowing Flux to reconcile consecutive deploys without
immutable field errors.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 19:07:47 +00:00