senke
|
b51b627ad4
|
test(e2e): add comprehensive auth flow tests
Created Playwright E2E tests for complete authentication flow to
prevent regressions and validate all auth-related fixes.
Test Coverage:
- ✅ Login with valid credentials
- ✅ Login with invalid credentials (error handling)
- ✅ Session persistence after page refresh (P1.2)
- ✅ Logout clears session and redirects
- ✅ Register new user
- ✅ Protected routes redirect when not authenticated
- ✅ Health endpoint accessibility (P1.6)
- ✅ CORS headers present on API requests (P1.1)
- ✅ Token refresh handling
- ✅ Max refresh attempts logout (P1.4)
- ✅ CSRF token on mutations (P1.3)
Test Structure:
- Authentication Flow: 7 tests
- Token Refresh Flow: 2 tests
- CSRF Protection: 1 test
Usage:
npx playwright test tests/e2e/auth.spec.ts
Impact: Automated regression detection for all Phase 1 auth fixes.
Fixes: P3.3 from audit AUDIT_TEMP_29_01_2026.md
|
2026-01-29 23:43:22 +01:00 |
|