Add passkey authentication E2E tests

Uses Playwright's virtual WebAuthn authenticator (CDP) to test:
- Register with passkey + sign in (full round-trip)
- Login fails with no credential (friendly error message)
- Duplicate email rejection
- Duplicate username rejection

Would have caught the credential encoding bug.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-03-27 21:33:34 +01:00
parent 24fc6cc089
commit 39b57b73b7
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9
2 changed files with 120 additions and 0 deletions

View file

@ -31,6 +31,14 @@ export default defineConfig({
baseURL: "http://localhost:3001",
},
},
{
name: "auth",
testMatch: "auth.test.ts",
use: {
...devices["Desktop Chrome"],
baseURL: "http://localhost:3000",
},
},
{
name: "integration",
testMatch: "integration.test.ts",