From 149465a16aab8697f7d780167c7cfa12bf2d34ac Mon Sep 17 00:00:00 2001 From: Paperclip Date: Fri, 27 Mar 2026 22:33:40 +0000 Subject: [PATCH] fix(e2e): add dev/config, dev/users, and branding mocks to navigation.spec.ts Playwright matches routes in last-registered-first-served order, so the catch-all /api/** handler was overwriting the authDisabled: true fixture. Added specific handlers before the catch-all to ensure auth config, user list, and branding responses are properly shaped. Co-Authored-By: Paperclip --- apps/e2e/tests/navigation.spec.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/e2e/tests/navigation.spec.ts b/apps/e2e/tests/navigation.spec.ts index 544518a..8221ede 100644 --- a/apps/e2e/tests/navigation.spec.ts +++ b/apps/e2e/tests/navigation.spec.ts @@ -10,6 +10,15 @@ test.beforeEach(async ({ page }) => { // Reports endpoints need shaped responses (not bare []) to avoid render crashes. await page.route("/api/**", (route) => { const url = route.request().url(); + if (url.includes("/api/dev/config")) { + return route.fulfill({ json: { authDisabled: true } }); + } + if (url.includes("/api/dev/users")) { + return route.fulfill({ json: { staff: [], clients: [] } }); + } + if (url.includes("/api/branding")) { + return route.fulfill({ json: { businessName: "GroomBook", logoUrl: null, theme: "default" } }); + } if (url.includes("/api/reports/summary")) { return route.fulfill({ json: {