feat: flip routing — customer portal at /, admin at /admin (#57)

* feat: flip routing — customer portal at /, admin at /admin

Move all admin dashboard routes under /admin prefix and mount the
customer portal at root (/). This gives customers clean, shareable
URLs while staff bookmark /admin.

- Admin routes: /admin, /admin/clients, /admin/services, etc.
- Customer portal: / (root)
- Admin nav "Customer Portal" link points to / for staff preview
- Updated tests for new route structure and fixed React 19 act compat

Closes #56

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* fix(e2e): update tests for routing flip — admin at /admin, portal at /

All E2E tests now use /admin prefix for admin routes (clients, services,
staff, invoices, reports, book). Adds customer portal smoke test at /.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(e2e): use specific locator for customer portal test

getByText('Paws & Reflect') matched 3 elements causing strict mode
violation. Scope to navigation role for unique match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Groom Book CTO <cto@groombook.dev>
Co-authored-by: Paperclip <noreply@paperclip.ing>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit was merged in pull request #57.
This commit is contained in:
groombook-paperclip[bot]
2026-03-19 02:47:19 +00:00
committed by GitHub
parent 1136824fe3
commit c901b1135d
5 changed files with 69 additions and 49 deletions
+3 -3
View File
@@ -46,7 +46,7 @@ test("complete booking flow", async ({ page }) => {
// ── Step 1: Select a service ──────────────────────────────────────────────
await page.goto("/book");
await page.goto("/admin/book");
await expect(page.getByText("Book an Appointment")).toBeVisible();
await expect(page.getByText("Choose a service")).toBeVisible();
@@ -99,7 +99,7 @@ test("booking form validation — required fields", async ({ page }) => {
route.fulfill({ json: [MOCK_SLOT] })
);
await page.goto("/book");
await page.goto("/admin/book");
await page.getByText("Full Groom").click();
await page.getByRole("button", { name: /\d{1,2}:\d{2}/ }).first().click();
await page.getByRole("button", { name: "Continue" }).click();
@@ -115,6 +115,6 @@ test("no services available — shows message", async ({ page }) => {
route.fulfill({ json: [] })
);
await page.goto("/book");
await page.goto("/admin/book");
await expect(page.getByText("No services available")).toBeVisible();
});