Files
work-club-manager/.sisyphus/evidence/task-26-test-execution.txt
WorkClub Automation b6f4c905d4 test(e2e): add Playwright E2E tests for auth, tasks, and shifts
Tasks 26-28: Comprehensive E2E test suite covering:
- Auth flow with Keycloak OIDC (6 tests)
- Task management lifecycle (10 tests)
- Shift sign-up and capacity enforcement (4 tests)

Total: 20 E2E tests (auth + tasks + shifts + smoke)

Tests require Docker Compose stack to run, but all compile successfully.
2026-03-05 10:34:03 +01:00

50 lines
3.6 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[WebServer] $ next dev
[WebServer] ⚠ The "middleware" file convention is deprecated. Please use "proxy" instead. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy
Running 6 tests using 6 workers
[1/6] [chromium] e2e/auth.spec.ts:78:7 Authentication Flow Scenario 2: Club switching refreshes data
[2/6] [chromium] e2e/auth.spec.ts:140:7 Authentication Flow Scenario 3: Logout flow - clears session and blocks protected routes
[3/6] [chromium] e2e/auth.spec.ts:22:7 Authentication Flow Scenario 1: Full auth flow E2E - redirect → Keycloak → club picker → dashboard
[4/6] [chromium] e2e/auth.spec.ts:165:7 Authentication Flow Unauthenticated user blocked from protected routes
[5/6] [chromium] e2e/auth.spec.ts:180:7 Authentication Flow Single-club user bypasses club picker
[6/6] [chromium] e2e/auth.spec.ts:203:7 Authentication Flow Keycloak login with invalid credentials fails
[WebServer] [auth][error] MissingSecret: Please define a `secret`. Read more at https://errors.authjs.dev#missingsecret
[WebServer]  at assertConfig (/Users/mastermito/Dev/opencode/frontend/.next/dev/server/edge/chunks/97170_@auth_core_71f8dcfb._.js:513:16)
[WebServer]  at Auth (/Users/mastermito/Dev/opencode/frontend/.next/dev/server/edge/chunks/97170_@auth_core_71f8dcfb._.js:5331:242)
[WebServer]  at runNextTicks (node:internal/process/task_queues:65:5)
[WebServer]  at listOnTimeout (node:internal/timers:567:9)
[WebServer]  at process.processTimers (node:internal/timers:541:7)
[WebServer] [auth][error] MissingSecret: Please define a `secret`. Read more at https://errors.authjs.dev#missingsecret
[WebServer]  at assertConfig (/Users/mastermito/Dev/opencode/frontend/.next/dev/server/edge/chunks/97170_@auth_core_71f8dcfb._.js:513:16)
[WebServer]  at Auth (/Users/mastermito/Dev/opencode/frontend/.next/dev/server/edge/chunks/97170_@auth_core_71f8dcfb._.js:5331:242)
 1) [chromium] e2e/auth.spec.ts:165:7 Authentication Flow Unauthenticated user blocked from protected routes
Error: expect(received).toBe(expected) // Object.is equality
Expected: "/tasks"
Received: null
173 | // Verify callbackUrl query param exists
174 | const url = new URL(page.url());
> 175 | expect(url.searchParams.get('callbackUrl')).toBe('/tasks');
| ^
176 |
177 | console.log('✅ Protected route correctly blocked');
178 | });
at /Users/mastermito/Dev/opencode/frontend/e2e/auth.spec.ts:175:49
attachment #1: screenshot (image/png) ──────────────────────────────────────────────────────────
test-results/auth-Authentication-Flow-U-632cf-ocked-from-protected-routes-chromium/test-failed-1.png
────────────────────────────────────────────────────────────────────────────────────────────────
Error Context: test-results/auth-Authentication-Flow-U-632cf-ocked-from-protected-routes-chromium/error-context.md