f2501d9972
* feat: add customizable business branding (name, logo, colors) Add admin settings for business branding with name, logo upload, and color scheme via CSS custom properties. Includes database migration, API endpoints, admin settings page, and dynamic branding in both admin nav and customer portal. Closes #61 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address review feedback on branding PR - Replace dynamic import with static import for @groombook/db in public branding endpoint - Restore active nav item background highlight (bg-stone-100) in CustomerPortal - Remove non-null assertion in settings route, add proper error handling Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: trigger CI * fix: resolve lint error and test failure for branding feature Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * 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 <noreply@anthropic.com> --------- Co-authored-by: GroomBook CTO <cto@groombook.dev> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: GroomBook CTO <cto@groombook.app>
43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
import { test as base } from "@playwright/test";
|
|
|
|
/**
|
|
* Custom test fixture that bypasses the dev login redirect for E2E tests.
|
|
*
|
|
* When AUTH_DISABLED=true, the app fetches /api/dev/config and redirects to
|
|
* /login if no dev-user is in localStorage. This fixture:
|
|
* 1. Mocks /api/dev/config to return authDisabled: false
|
|
* 2. Seeds localStorage with a dev user as a fallback
|
|
*
|
|
* This ensures E2E tests render pages directly without the login redirect.
|
|
*/
|
|
export const test = base.extend({
|
|
page: async ({ page }, use) => {
|
|
// Mock the dev config endpoint so the app skips the auth-disabled redirect
|
|
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(
|
|
"dev-user",
|
|
JSON.stringify({ type: "staff", id: "dev-user", name: "Dev User" })
|
|
);
|
|
});
|
|
await use(page);
|
|
},
|
|
});
|
|
|
|
export { expect } from "@playwright/test";
|