From 7d030f20db896ee0ad63b81d1755339d694a798c Mon Sep 17 00:00:00 2001 From: GroomBook CTO Date: Thu, 19 Mar 2026 11:04:40 +0000 Subject: [PATCH] fix: update E2E tests for branding changes - Update navigation test to expect "GroomBook" (default branding) instead of hardcoded "Paws & Reflect" since CustomerPortal now uses dynamic branding - Add /api/branding mock to shared E2E fixtures so BrandingProvider resolves immediately in all tests, preventing unhandled fetch interference Co-Authored-By: Claude Opus 4.6 --- apps/e2e/tests/fixtures.ts | 12 ++++++++++++ apps/e2e/tests/navigation.spec.ts | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/e2e/tests/fixtures.ts b/apps/e2e/tests/fixtures.ts index bf26d5f..6dc1c72 100644 --- a/apps/e2e/tests/fixtures.ts +++ b/apps/e2e/tests/fixtures.ts @@ -16,6 +16,18 @@ export const test = base.extend({ await page.route("**/api/dev/config", (route) => route.fulfill({ json: { authDisabled: false } }) ); + // Mock the branding endpoint so BrandingProvider resolves immediately + await page.route("**/api/branding", (route) => + route.fulfill({ + json: { + businessName: "GroomBook", + primaryColor: "#4f8a6f", + accentColor: "#8b7355", + logoBase64: null, + logoMimeType: null, + }, + }) + ); // Seed localStorage as a fallback in case the mock is bypassed await page.addInitScript(() => { localStorage.setItem( diff --git a/apps/e2e/tests/navigation.spec.ts b/apps/e2e/tests/navigation.spec.ts index e79a5f6..544518a 100644 --- a/apps/e2e/tests/navigation.spec.ts +++ b/apps/e2e/tests/navigation.spec.ts @@ -42,7 +42,7 @@ test.beforeEach(async ({ page }) => { test("customer portal loads at root", async ({ page }) => { await page.goto("/"); - await expect(page.getByRole("navigation").getByText("Paws & Reflect")).toBeVisible(); + await expect(page.getByRole("navigation").getByText("GroomBook")).toBeVisible(); await expect(page.locator("nav")).toBeVisible(); });