Add Playwright e2e coverage + comment-level video upload workflow #40

Merged
shaun merged 7 commits from ai-agent/38-allow-administrators-to-create-local-login-users into main 2026-02-22 21:20:20 +00:00
Owner

Summary

  • add Playwright e2e auth setup + seeded test DB flow
  • fix Playwright startup order so DB seed runs before web server uses SQLite
  • add full trip-planning e2e scenario (future trip, travellers, destination, flight, lodging, upcoming verification)
  • configure Auth.js custom sign-in page for base-path routing
  • add repo guidance in AGENTS.md / CLAUDE.md requiring e2e for user-facing changes
  • document and validate comment-level Gitea video attachment workflow (create comment, upload to comment assets endpoint)

Validation

  • bunx playwright test e2e/auth.test.ts --project=chromium\n- bunx playwright test e2e/trip-planning.test.ts --project=chromium
  • PW_VIDEO_MODE=on PW_TRACE_MODE=off bunx playwright test e2e/trip-planning.test.ts --project=chromium

Issue

## Summary - add Playwright e2e auth setup + seeded test DB flow - fix Playwright startup order so DB seed runs before web server uses SQLite - add full trip-planning e2e scenario (future trip, travellers, destination, flight, lodging, upcoming verification) - configure Auth.js custom sign-in page for base-path routing - add repo guidance in AGENTS.md / CLAUDE.md requiring e2e for user-facing changes - document and validate comment-level Gitea video attachment workflow (create comment, upload to comment assets endpoint) ## Validation - bunx playwright test e2e/auth.test.ts --project=chromium\n- bunx playwright test e2e/trip-planning.test.ts --project=chromium - PW_VIDEO_MODE=on PW_TRACE_MODE=off bunx playwright test e2e/trip-planning.test.ts --project=chromium ## Issue - relates to #38
shaun added 7 commits 2026-02-22 21:17:10 +00:00
admin) manage local login users
Some checks failed
PR Checks / lint-test-and-docker-build (pull_request) Failing after 1m2s
5c7bae61b5
fix(admin/users): convert Svelte 4 event syntax to Svelte 5
All checks were successful
PR Checks / lint-test-and-docker-build (pull_request) Successful in 2m15s
345da2ef7a
Replace `on:keydown` with `onkeydown` and `onsubmit|preventDefault`
with inline handlers calling `e.preventDefault()` to fix compilation
errors caused by mixing old and new Svelte event syntax.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(login): pass callbackUrl so local auth redirects to app after sign-in
All checks were successful
PR Checks / lint-test-and-docker-build (pull_request) Successful in 2m15s
348aac996d
After a successful Credentials sign-in, Auth.js was redirecting to its
own built-in /auth/signin page because no callbackUrl was provided.
Add a callbackUrl hidden field (pointing to the app root) so Auth.js
redirects back to the application after local login completes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(login): post local credentials to /auth/callback/local not /signin/local
Some checks failed
PR Checks / lint-test-and-docker-build (pull_request) Failing after 1m3s
67648a5ba4
The Credentials provider in Auth.js processes credentials at the
/callback/:provider endpoint, not /signin/:provider. Posting to
/signin/local hits a code path that just redirects back to the Auth.js
built-in sign-in page. Changing to /callback/local routes the form
submission to the correct handler.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(admin/users): show all auth sources when a user has multiple credentials
Some checks failed
PR Checks / lint-test-and-docker-build (pull_request) Failing after 1m0s
f4c5ee1f8f
listUsers() now LEFT JOINs local_credentials and returns has_local_credentials.
The auth source cell renders both the primary auth_source badge and a secondary
Local badge when an OIDC user also has local credentials set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
test(login): update test to expect /callback/local and assert callbackUrl
All checks were successful
PR Checks / lint-test-and-docker-build (pull_request) Successful in 2m12s
4b06ecfa22
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
trips) add playwright e2e flows and issue video upload guidance
All checks were successful
PR Checks / lint-test-and-docker-build (pull_request) Successful in 2m27s
595b805722
shaun merged commit fe289f0895 into main 2026-02-22 21:20:20 +00:00
shaun deleted branch ai-agent/38-allow-administrators-to-create-local-login-users 2026-02-22 21:20:21 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: campbellwireless/trips#40