trails/e2e
Ullrich Schäfer be64e2df5c
test(e2e): journal↔planner save handoff covers Phase A + Phase B
New \`e2e/journal-planner-save.test.ts\` exercises the full save flow:

1. Seed a routeId + JWT via \`/api/e2e/seed\` (journal).
2. POST to \`/api/sessions\` on the planner with \`callbackUrl\` +
   \`callbackToken\` — mirrors what the journal's \`edit-in-planner\`
   action does server-to-server.
3. Open the planner session in a real browser.
4. Click \"Save to Journal\". The button POSTs sessionId+GPX to the
   planner's \`/api/save-to-journal\` action (Phase A); the action
   forwards to the journal callback with the Bearer.

Test 1 asserts:
- The journal's route ends up with geometry (round-trip works).
- The exact JWT string is **never** present in any browser-issued
  request body or \`Authorization\` header — i.e. Phase A correctly
  keeps the token server-side.

Test 2 asserts:
- A second click on Save reuses the same stored JWT, the journal's
  jti consumer rejects it, and the planner UI surfaces the error.
  This is the Phase B replay guard exercised end-to-end through the
  UI rather than just the API.

Added \`journal-planner-save\` Playwright project (no baseURL — the
test navigates both apps using absolute URLs).

Full repo: pnpm typecheck / lint / test all green (cached).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 00:43:56 +02:00
..
fixtures Stabilize e2e against Vite dev hydration race 2026-05-08 01:06:27 +02:00
helpers Split planner E2E tests into focused feature files 2026-05-22 21:58:10 +02:00
auth.test.ts Drop workers=1 — hydration helper is sufficient 2026-05-08 01:10:15 +02:00
demo-bot.test.ts Fix e2e fallout from default-private profile_visibility 2026-04-25 23:46:56 +02:00
explore.test.ts Stabilize e2e against Vite dev hydration race 2026-05-08 01:06:27 +02:00
integration.test.ts fix(journal): single-use JWT enforcement for route callback tokens (#2 Phase B) 2026-05-26 00:38:08 +02:00
journal-planner-save.test.ts test(e2e): journal↔planner save handoff covers Phase A + Phase B 2026-05-26 00:43:56 +02:00
journal.test.ts Rebuild the Journal home around a public feed and flagship marketing 2026-04-24 20:00:23 +02:00
komoot-import.test.ts Make listImportable resilient to Komoot API errors; fix import E2E test 2026-05-23 11:05:15 +02:00
notifications.test.ts Stabilize e2e against Vite dev hydration race 2026-05-08 01:06:27 +02:00
planner-coloring.test.ts test(e2e/planner-coloring): bump canvas timeout 10s→20s 2026-05-25 23:44:53 +02:00
planner-multiday.test.ts Split planner E2E tests into focused feature files 2026-05-22 21:58:10 +02:00
planner-overlays.test.ts Split planner E2E tests into focused feature files 2026-05-22 21:58:10 +02:00
planner-routing.test.ts Split planner E2E tests into focused feature files 2026-05-22 21:58:10 +02:00
planner-session.test.ts Split planner E2E tests into focused feature files 2026-05-22 21:58:10 +02:00
public-content.test.ts Stabilize e2e against Vite dev hydration race 2026-05-08 01:06:27 +02:00
settings.test.ts Redesign navbar with avatar dropdown and mobile drawer 2026-04-26 09:56:20 +02:00
social.test.ts Stabilize e2e against Vite dev hydration race 2026-05-08 01:06:27 +02:00