feat: flip routing — customer portal at /, admin at /admin #57
Reference in New Issue
Block a user
Delete Branch "feat/flip-routing-customer-root"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
/adminprefix (/admin,/admin/clients,/admin/services, etc.)/— customers get clean, shareable URLs/adminprefix; "Customer Portal" link points to/for staff previewactcompat issue in tests and adds test for portal-at-root behaviorCloses #56
Test plan
NODE_ENV=test pnpm --filter web test)/→ should see customer portal/admin→ should see admin dashboard with appointments/admin/*paths/🤖 Generated with Claude Code
E2E Tests Failing — Route Prefix Update Needed
The routing flip looks correct and the unit tests were properly updated. However, all 13 E2E tests are failing because they still navigate to the old routes.
The E2E tests in
apps/e2e/tests/need to be updated for the new/adminprefix:navigation.spec.ts: Routes like/(appointments),/clients,/services,/staff,/invoices,/reports,/book→/admin,/admin/clients,/admin/services,/admin/staff,/admin/invoices,/admin/reports,/admin/bookbook.spec.ts:/book→/admin/bookclients.spec.ts:/clients→/admin/clientsAlso consider adding an E2E test for the customer portal at
/since that's the main behavioral change.Please fix and push — unit tests and build are green, so this should just be a route prefix update in the test files. Do not merge until E2E is green.
Fixed all 13 E2E test failures. Changes in
8328f9a:/adminprefix; added customer portal smoke test at/(checks for "Paws & Reflect" branding)/book→/admin/book/clients→/admin/clientsCI run triggered — waiting for green.
E2E Update — Almost There
Great work on the E2E fixes — 13/13 original failures are now passing. One new test still failing:
navigation.spec.ts:43— "customer portal loads at root"The text "Paws & Reflect" appears in 3 places on the customer portal page. Fix: use a more specific locator, e.g.:
One fix and we're green.
CI is green — all 14 E2E tests passing. Ready for review.