Manager Mock Data
Manager mock data workflows
This note documents the focused manager mock-data verification surface. It does not claim repo-wide green status.
Mock mode#
Manager runs against deterministic in-memory mock APIs when VITE_USE_MOCK_API=true. The manager Playwright config sets this for pnpm e2e:manager in both dev-server and production-style modes.
Mock login personas are defined in packages/saas-api/src/mock.ts and surfaced on /login:
E2E route and action coverage#
Covered by e2e/manager/tests/auth.spec.ts, e2e/manager/tests/customer-dashboard.spec.ts, and e2e/manager/tests/admin.spec.ts.
Customer coverage signs in as John Doe and verifies populated mock-backed pages/actions:
/dashboard— customer summary and recent invoices./services— service cards backed by the customer's active subscriptions./subscriptions— existing subscriptions plus create and cancel subscription actions./subscriptions/$id— subscription details and related invoices./billing— invoice list plus pay invoice action./billing/$id— invoice detail page./user/settings— profile settings update./user/security— security form rendering./support— account-specific support snapshot.
Admin coverage signs in as Jane Smith and verifies populated mock-backed pages/actions:
/admin— admin dashboard and navigation./admin/subscriptionsand/admin/subscriptions/$id— status filtering plus cancel subscription action./admin/invoicesand/admin/invoices/$id— status filtering plus mark-paid action./admin/settings— platform settings update persistence in mock state.
Auth coverage verifies mock credential cards, direct mock sign-in buttons, invalid credential messaging, validation, role-aware redirects, and route protection for /dashboard and /admin.
Focused verification evidence#
Commands run from the repo root on 2026-04-30:
1mise run install2mise exec -- pnpm --filter @assistance/saas-api typecheck3mise exec -- pnpm --filter @assistance/saas-api test4mise exec -- pnpm --filter manager typecheck5mise exec -- pnpm --filter manager test6mise exec -- pnpm e2e:managerObserved results:
mise run installcompleted successfully with pnpm 10.24.0.@assistance/saas-apitypecheck passed.@assistance/saas-apitests passed: 1 test file, 17 tests.managertypecheck passed.managertests passed: 10 test files, 47 tests.pnpm e2e:managerpassed: 14 Chromium Playwright tests.
Known command-surface note: packages/tsconfig/base.json uses ignoreDeprecations: "5.0" so the workspace TypeScript 5.9 compiler accepts the shared tsconfig during package typechecks.