- 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>
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>
- 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>
feat(e2e): add J1 and J8 journey tests
- J1: Registration and Login — register flow, validation errors,
sign-in with existing account, nav between pages
- J8: Unauthenticated Access — /, /purchases, /products, /coupons
all redirect to /login when no session
- Enable VITE_MOCK_AUTH in playwright webServer so registration
tests work without a live Better-Auth instance
- Add playwright to devDependencies to ensure CI has the package
Co-Authored-By: Paperclip <noreply@paperclip.ing>