Commit Graph

43 Commits

Author SHA1 Message Date
m038 8c32ac707e test: merge playwright-tests branch — reorganise, extend, fix
- Reorganise flat tests/ui/ into feature subdirectories (auth/ post/ gpx/
  maps/ stories/ dailies/ home/ nav/ trip/ a11y/)
- Fix stale trip-slug refs (japan-korea-2026 / italy-2025 → italy-2026-demo)
- Add tests/fixtures/test-route.gpx
- Add GPX Manager spec (GM1–GM7) with real API calls and afterAll cleanup
- Add post-form tests P6–P8 (success message, date frontmatter, form reset)
- Add AX6 (gpx-manager mocked) and AX7 (story page) axe scans
- Fix auth.setup.js AUTH_FILE path; add @axe-core/playwright devDependency
- Fix fixture paths in post specs after subdirectory move

Known failures (not regressions):
  AX6/AX7 — real a11y violations in site (color-contrast, label, scrollable)
  H1/M8   — require travelling:true; site is currently between trips

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WPJztrVGbwic2xTG7G9fjM
2026-06-21 17:16:57 +02:00
m038 db7c102da1 Merge branch 'worktree-playwright-tests'
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 17:12:37 +02:00
m038 b79c0da808 fix: correct fixture paths in post specs after subdirectory move 2026-06-21 16:58:45 +02:00
m038 f22d32f056 test: add AX6 (gpx-manager, mocked) and AX7 (story page) axe scans
Both scans reveal real violations documented in task-6-report.md.
Full suite: 64 passed, 15 failed (2 new AX failures + 13 pre-existing).
2026-06-21 16:54:50 +02:00
m038 1b319ca8ae test: add P6-P8 — success message, date pre-fill, form reset
- P6: verify "Entry posted successfully!" toast after submit
- P7: verify server resolves default:now to a recent timestamp in saved frontmatter (Grav renders the literal "now" string in the HTML input; resolution happens server-side)
- P8: verify title/content fields empty after successful submit (form reset:true)

Also fix pre-existing helpers.js issues:
- TRACKER_DIR now resolves via docker inspect or GRAV_USER_DIR env var so tests find entries even when running from a worktree without a user/ directory
- DAILIES_URL exported and derived from post-form.md pageconfig.parent so P1/P2 navigate to the correct active-trip URL
- cleanupEntry/findEntry now guard against missing TRACKER_DIR
- P2 marked test.skip (was running and failing on missing fixture)
2026-06-21 16:45:04 +02:00
m038 2c8d676e25 test: add GPX Manager end-to-end spec (GM1-GM7)
Also fix auth.setup.js AUTH_FILE path: the file lives in tests/ui/auth/
so the relative path to tests/.auth/user.json needs ../../ not ../ to
match the storageState path in playwright.config.js.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WPJztrVGbwic2xTG7G9fjM
2026-06-21 16:35:48 +02:00
m038 2ab0b13eb6 test: reorganise tests/ui/ into feature subdirectories 2026-06-21 16:22:17 +02:00
m038 f00f48c40c fix: add @axe-core/playwright to devDependencies; remove duplicate ITALY_URL constant 2026-06-21 16:18:10 +02:00
m038 508fcbdbe8 test: fix stale trip-slug references; add home, highlights, a11y specs 2026-06-21 16:12:42 +02:00
m038 0ba479c7c9 test(home): document H4 coordinate dependency 2026-06-21 01:51:36 +02:00
m038 c862827ac2 test(home): add H2–H5 between-trips highlights Playwright tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-21 01:48:46 +02:00
m038 0c924139b1 test(maps): add M8 — home map GPX source on active trip 2026-06-21 01:43:27 +02:00
m038 b9e0e39402 fix: make demo-load writable, fix photo strip a11y, fix M7 marker click
- Makefile: add chown 1000:1000 after demo-load so Grav can create entries
- Makefile: add collection config to demo dailies.md (page.collection() needs it)
- base.html.twig: add tabindex="0" to journal-photo-strip for keyboard access (AX1-AX3)
- maps.spec.js: use force:true on M7 marker click (start/end overlap at Campiglia)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-20 22:12:33 +02:00
m038 9c2177600c test: switch all test fixtures from japan-korea-2026 to italy-2026-demo
- Replace all japan-korea-2026 URL references in test files
- dailies.spec.js: update KNOWN_SLUG/TITLE/CITY/COUNTRY to first campiglia entry
- accessibility.spec.js: update AX4 entry URL to campiglia entry
- helpers.js: update TRACKER_DIR to italy-2026-demo dailies

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-20 22:00:45 +02:00
m038 26c91fcc38 test(stories): update story slugs to match new demo content 2026-06-20 21:18:08 +02:00
m038 d13e4dffb8 test(a11y): add A3e-A3f cycling toggle aria-expanded tests (italy-2026-demo) 2026-06-20 20:57:46 +02:00
m038 5cfd3a8d85 feat(a11y): add axe-core WCAG 2.1 AA regression scans (AX1-AX5) and fix active filter button contrast 2026-06-20 20:49:33 +02:00
m038 49e983e804 test(a11y): add A5 GPX delete button accessible name test 2026-06-20 20:36:48 +02:00
m038 6d771855ee test(a11y): add A4a-A4b photo strip keyboard tests 2026-06-20 20:32:15 +02:00
m038 54180321be test(a11y): add A3a-A3d aria-pressed and aria-expanded tests 2026-06-20 20:27:50 +02:00
m038 0db4ea9496 test(a11y): add A2 color contrast token test 2026-06-20 20:23:05 +02:00
m038 1e28081b31 test(a11y): add A1 skip link test 2026-06-20 20:19:30 +02:00
m038 069d6d05a2 fix: skip P2 photo-upload test (parked); restore all system media types in media.yaml 2026-06-20 18:31:53 +02:00
m038 0729e4ea1d fix: update tests for demo reorganisation (italy-2026-demo, central-asia ordering, japan real entry)
- dailies T2: switch ordering test to central-asia-2023 (pixelfed-1 oldest, pixelfed-22 newest)
- dailies T3-T6: update KNOWN_SLUG/TITLE/CITY/COUNTRY to the real japan entry (2026-06-17)
- stories S1-S7: update all italy-2025 URLs to italy-2026-demo
- stories S5/S6: fix URL regex and use val-dorcia-dawn for hero sanity check
- maps M5/M6: point Italy GPX map tests to italy-2026-demo (has markers + GPX)
- global-setup: run make demo-load before tests so italy-2026-demo always exists
- post P2: add retries:1 + test.setTimeout(60s) for intermittent FilePond upload
- user: story template hero fallback for media.types config override (see user commit)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-20 16:31:37 +02:00
m038 2a8781d970 test: add H1 home page journal-post test 2026-06-20 15:34:33 +02:00
m038 0339529f44 test: add map animation wait in M7 for marker stability on heavier trip page 2026-06-20 15:16:35 +02:00
m038 9402594eb8 test: update M7 selector for journal-post.is-highlighted 2026-06-20 15:04:12 +02:00
m038 b3ceb4a8f7 test: update T1/T2 selectors for inline journal-post structure 2026-06-20 14:50:30 +02:00
m038 e7b60c0c4c test: add M7 test for map marker flash highlight on card + integrate user submodule update 2026-06-20 12:47:56 +02:00
m038 c2ea985546 refactor: collapse entry card article+a to flat <a>, unify hover targets across card types
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WPJztrVGbwic2xTG7G9fjM
2026-06-20 12:38:35 +02:00
m038 4d87f8fef2 test: add T6 test for entry page back pills; feat: add fixed back pill and update footer 2026-06-20 12:31:16 +02:00
m038 58e84afebd feat: add S7 test for story footer back-pill styling
Add Playwright test S7 to verify that the story footer back link
renders with the .back-pill class for consistent design system styling.
This test scrolls past the hero to reveal the footer and checks both
class presence and text content.

Also update user submodule pointer to include the back-pill application.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WPJztrVGbwic2xTG7G9fjM
2026-06-20 12:23:57 +02:00
m038 6d20e0fedc test: add S1–S6 Playwright tests for story mode (listing, shortcodes, back nav, cross-trip) 2026-06-20 10:13:56 +02:00
m038 832e135e3a fix: correct stale G1-G4 comment to G1-G5 in gpx-journey spec 2026-06-20 00:54:06 +02:00
m038 0b49f90206 test: add M5–M6 integration tests for GPX connector logic 2026-06-20 00:50:19 +02:00
m038 5a52b8ff18 test: add Playwright tests G1-G5 for buildJourneySegments algorithm
Tests load italy-2025 map page to get MapUtils in scope, then exercise the
GPX proximity algorithm with synthetic data via page.evaluate.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WPJztrVGbwic2xTG7G9fjM
2026-06-20 00:39:45 +02:00
m038 3fbba7672d test: fix M2 timing — wait for first marker before counting
Markers are added in map.on('load') which fires after the canvas
becomes visible; the old check was racy. Add an explicit waitFor
so M2 reliably passes with demo data loaded.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-19 23:17:05 +02:00
m038 b1ec642d60 test: add MapLibre canvas tests (M1–M4), skip N5 (map nav link disabled)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G7CzY4z2Qm5sYE2nySRWuH
2026-06-19 21:52:38 +02:00
m038 28dc6c1f6c test: add F1–F7 Playwright tests for trip page filter bar and stats toggle 2026-06-19 21:51:13 +02:00
m038 3c35176b90 test: update N4 — filter bar replaces trip nav link to dailies 2026-06-19 21:50:41 +02:00
m038 5e954d8adf fix: update paths for trips/japan-korea-2026/dailies restructure
- Update post form parent, Makefile demo targets, and test scripts to use
  new trip-scoped paths (01.trips/japan-korea-2026/01.dailies)
- Rename tracker.spec.js → dailies.spec.js and update all /tracker URLs
  to /trips/japan-korea-2026/dailies across nav.spec.js, post.spec.js,
  helpers.js, and dailies.spec.js
- Add Italy 2025 demo trip to Makefile demo-load/demo-reset targets

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 01:49:38 +02:00
m038 a50e7f5386 feat: add comprehensive Playwright UI test suite
25 tests across auth (A1-A5), posting (P1-P5), validation (V1-V4),
tracker (T1-T5), and nav (N1-N5). Uses storageState for single login
per run. Replaces post-with-photo.spec.js with post.spec.js.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 22:34:11 +02:00
m038 545e3f5ba0 feat: add Playwright UI test for post-with-photo flow 2026-06-18 20:35:17 +02:00