Commit graph

12 commits

Author SHA1 Message Date
Johan Lundberg
5a24a9c70b
test: add E2E tests for admin pages 2026-02-19 14:31:41 +01:00
Johan Lundberg
8a610a0cd6
feat: add self-service profile page with manage navigation
Add /manage/profile page where authenticated users can view and edit
their OIDC profile fields (given_name, family_name, preferred_username,
email, phone_number, picture, locale).

- Create manage/base.html with tab-style nav for Profile/Credentials
- Update credentials.html to extend manage/base.html
- Add GET/POST routes with server-side validation
- Add input styling for tel and url input types
- Add profile test user with pre-filled data in setup_db.py
- Add 19 E2E tests covering structure, navigation, updates, validation
- All 76 E2E tests and 172 Python tests pass
2026-02-18 14:35:17 +01:00
Johan Lundberg
70c97233c5
fix(e2e): fix WebAuthn and integration test failures
- Use localhost instead of 127.0.0.1 as TARGET_URL so the WebAuthn RP ID
  is a valid domain (the spec forbids IP addresses)
- Replace request.post('/logout') with page.context().clearCookies() since
  Playwright's request fixture has a separate cookie jar from the page
- Add registerPasskey() helper that waits for 'load' event to reliably
  detect the page reload after successful registration
- Track credential count with getCredentialCount() since credentials
  accumulate across serial tests sharing the same database
- Fix login.spec.js selector from #webauthn-login-form to #webauthn-login-btn
  to match the actual template

All 57 E2E tests now pass (50 migrated + 7 WebAuthn).
2026-02-18 12:45:03 +01:00
Johan Lundberg
71ddf5d8ff
feat(e2e): add WebAuthn E2E tests with CDP virtual authenticator 2026-02-18 11:52:47 +01:00
Johan Lundberg
c96ebe1b64
feat(e2e): add WebAuthn test user to fixture seeding 2026-02-18 11:47:11 +01:00
Johan Lundberg
ef8bf10555
refactor(e2e): remove old custom test runner 2026-02-18 11:43:17 +01:00
Johan Lundberg
7900f264ba
refactor(e2e): migrate all tests to Playwright Test 2026-02-18 11:37:23 +01:00
Johan Lundberg
174c6c001e
feat: migrate e2e test infrastructure to @playwright/test
Replace direct playwright dependency with @playwright/test and add
playwright.config.js for centralized test configuration. Update run.sh
to invoke 'npx playwright test' instead of running test files with node.
2026-02-18 11:10:23 +01:00
Johan Lundberg
7cb1adbd06
update all imports in test files: fastapi_oidc_op → porchlight 2026-02-16 15:34:53 +01:00
Johan Lundberg
c5a80b51de
rename package directory fastapi_oidc_op → porchlight 2026-02-16 15:29:31 +01:00
Johan Lundberg
c381896de4
test: add comprehensive e2e test suite with shared helpers and DB seeding
Extract shared test runner (helpers.js), add file-based SQLite with
setup_db.py for fixture seeding, and add tests for auth guard, credentials
management, full registration flow, health endpoint, password auth, and
magic link registration errors. 66 checks across 7 test files.
2026-02-16 14:41:14 +01:00
Johan Lundberg
e8fd7eb01d
test: add end-to-end browser tests with Playwright
Set up tests/e2e/ with a login page test covering branding, accessibility,
form structure, theme colors, and static asset serving. Includes run.sh
that manages the app lifecycle (start, test, stop) automatically.
2026-02-16 12:22:58 +01:00