Commit Graph

7 Commits

Author SHA1 Message Date
Barcode Betty 09f88f0bf8 fix(e2e): await route mocks and add session mocking to all tests
- Make mockAuthRoutes async and await all page.route() calls to prevent race conditions
- Add auth route mocking to J8 unauth tests (required since VITE_MOCK_AUTH was removed)
- Add auth route mocking to smoke test
- Replace broken mockSessionPending with mockSessionDelayed for spinner test

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-15 21:41:05 +00:00
Barcode Betty 68420b5f01 fix(e2e): add mock for /auth/session endpoint
The J8 test calls /api/auth/session which maps to /auth/session in Better Auth. Adding mock to ensure consistent behavior.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-15 21:41:04 +00:00
Barcode Betty b6da52fb07 fix(e2e): correct Better Auth mock response formats
- sign-up returns { token, user }
- sign-in returns { redirect, token, user }
- get-session returns { session, user }

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-15 21:41:04 +00:00
Barcode Betty 5e5f13c5b5 fix(e2e): use more permissive regex patterns for route mocking
Use wildcard patterns to match URLs with query parameters or trailing slashes.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-15 21:41:04 +00:00
Barcode Betty c47252a342 fix(e2e): correct Better Auth mock route patterns
- Changed sign-up route from /auth/register to /auth/sign-up/email
- Changed session route from /auth/session to /auth/get-session

Better Auth hits /auth/sign-up/email for registration and /auth/get-session for session checks.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-15 21:41:04 +00:00
Barcode Betty 00f3c86276 fix(e2e): replace VITE_MOCK_AUTH with Playwright route mocking
- Removed VITE_MOCK_AUTH=true from playwright.config.ts webServer command
- Added mockAuthRoutes helper to e2e/fixtures.ts to mock /auth/* endpoints
- Updated j1-registration-login.spec.ts to use route mocking instead
  of env var-based mock auth

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-15 21:41:04 +00:00
cartsnitch-engineer[bot] c2b5ccb830 feat(e2e): add axe-core accessibility fixture 2026-03-31 02:26:45 +00:00