Commit Graph
67 Commits
Author SHA1 Message Date
m038 01c3e72c8f test(post): add location-override Playwright coverage
Mocks the Open-Meteo geocoding endpoint via page.route() so the suite is
hermetic. Covers the panel's closed-by-default state, search happy path,
Paris/Texas disambiguation ranking, no-match/network-failure/in-flight
states, XSS-safe rendering, map canvas singleton behavior, drag sync, the
mismatch flag, the maplibre-gl lazy-load boundary, and a full submit
round-tripping lat/lng into the entry's frontmatter.
2026-07-24 19:38:39 +02:00
m038andClaude Fable 5 0defa85f58 test(post): cover the upload-submit gate and lightbox EXIF-dims invariant
Regression specs for the two 2026-07-09 prod bugs (fixed in user/ e17a5dc):

- upload-gate.spec.js — UG1/UG2: create submit is blocked with a visible
  message while a photo upload is in flight or after it FAILED; nothing may
  land on disk. The form plugin's own guard misses LOADING and
  PROCESSING_ERROR, which silently dropped a photo on a fast save.
- lightbox-dims.spec.js — LD1: a slide's data-pswp-* must equal the
  browser-rendered natural size of the linked image. Fixture is an 800x600
  JPEG with EXIF Orientation=6 (renders 600x800 portrait), planted on disk
  in the demo trip (the active trip may be an unpublished draft that 404s).

New fixture: tests/fixtures/test-photo-exif-portrait.jpg.

Note: the suite currently needs GRAV_TEST_USER/GRAV_TEST_PASS overrides —
the .env GRAV_TEST_PASS contains shell-special chars that break `make
test-account` (see the Makefile comment requiring a plain password).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0195b3cDdMeize2Mm1FgC2aU
2026-07-09 17:59:05 +02:00
m038andClaude Opus 4.8 2cdb435182 test(trip): cover publish-toggle failure/lock paths + missing-key 400
Add the three cases the code review flagged as uncovered:
- TP7 (R15): a failed POST reverts the switch and surfaces the visible toast.
- TP8 (R13): the in-flight lock suppresses a concurrent second submit (exactly
  one POST fires while the switch is aria-busy/disabled).
- TP5 leg: a MISSING published key -> 400 (the array_key_exists branch, distinct
  from the is_bool branch already covered).

All 10 trip-publish specs green (serial, worktree container).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mpdu3Dt1iVoozHwAMyjrbn
2026-07-08 17:17:09 +02:00
m038andClaude Opus 4.8 3e1ddd8132 test(trip): publish-toggle Playwright specs + plan/spec docs; bump user pin
TP1/TP1b/TP2–TP6 cover the owner gate, coverless drafts, cache-correct
hide/restore, the active-trip confirm, backend authz (401/403/400), and
the home fallback. The suite pins site.owner_username to the authenticated
test user (restore on teardown) and runs serially — it mutates global
config and clears the shared cache, so it collides with parallel readers.

Bumps the user/ pin to the finished trip-publish-toggle content (064f0f0)
and marks the plan Complete.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mpdu3Dt1iVoozHwAMyjrbn
2026-07-08 14:50:20 +02:00
m038andClaude Opus 4.8 2e96106c84 test(post): DEL4 — a deleted entry stays gone after a page reload
Guards the page-tree-index staleness fix. DEL1 only checked optimistic DOM
removal + disk; DEL4 reloads and asserts the server no longer renders the card.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mpdu3Dt1iVoozHwAMyjrbn
2026-07-08 10:29:21 +02:00
m038 877d29b2b4 Merge branch 'feat/journal-post-form'
# Conflicts:
#	Makefile
#	docs/working/backlog.md
#	user
2026-07-08 00:10:14 +02:00
m038andClaude Opus 4.8 5276768e12 test(trip-cover): cover-strip + retina-cap regression; bump user pin
- trip-header/trips-list specs now assert the cropZoom wide-strip aspect
  and the all-or-nothing retina rule (1x-only for sub-2w sources), and a
  new regression on us-canada-mex-2024 covers the reported portrait-blur
- remove the orphaned AE4 test (no-photos-demo fixture was deleted)
- backlog: full-res pixelfed reimport (luxury quality item)
- plan: record the cover-quality follow-up + AE4 fixture removal
- bump user pin -> 536ca20 (trip-description-hero cover fix)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDS6t8wcpbwKvvrxykVQ5K
2026-07-07 23:39:32 +02:00
m038andClaude Opus 4.8 af07ef403c test(trip): add AE4 no-banner coverage + record deferred review findings
- trip-header.spec.js: new U4/R9/AE4 test — a trip with no cover_image and no
  entry images renders its text header with no .trip-header-banner strip.
- Makefile: demo-load/demo-reset now also (un)load the no-photos-demo fixture,
  guarded with `|| true` so runs whose user/ predates the fixture skip it
  instead of failing globalSetup.
- plan: post-review follow-up notes the applied fixes and records the two
  intentionally-deferred findings (macro-owned resolution per KTD2; inline
  toggle script per U4's Approach) so they are not re-flagged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDS6t8wcpbwKvvrxykVQ5K
2026-07-07 09:13:59 +02:00
m038andClaude Opus 4.8 6a73be3e49 test(trip): tighten description-clamp assertion + correct R11 coverage note
- trip-header.spec.js: replace the vacuous `toContainText('finally made
  sense')` (the tail text is in the DOM even while collapsed) with real
  clamp/un-clamp assertions — clientHeight < scrollHeight when collapsed,
  clientHeight >= scrollHeight once expanded — so the test actually proves the
  toggle changes visibility.
- trips-list.spec.js: the header comment claimed R11 coverage no fixture
  provided. Note that R11 (set-but-unresolvable cover_image) shares the exact
  else-branch the R7/AE3 fallback test exercises, so it's covered by
  construction in the shared cover macro.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDS6t8wcpbwKvvrxykVQ5K
2026-07-07 08:35:41 +02:00
m038andClaude Opus 4.8 d576487886 test(post): share createPhotoEntry helper and fix cleanup leak
Hoist the duplicated per-spec createEntry photo-fixture into a single
createPhotoEntry() in helpers.js (used by delete-flow, edit-mode, and the
anon-view draft). Register the tag for cleanup BEFORE the awaited 15s
success-toast assertion, so a create that lands on disk but whose toast
assertion times out no longer leaks an untracked entry. Add AE3b covering the
disclosure deviation branch (a non-default toggle auto-expands More options).

Code review F2 (leak), F3 (duplication), F6 (coverage).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mpdu3Dt1iVoozHwAMyjrbn
2026-07-07 08:32:09 +02:00
m038andClaude Opus 4.8 7ea90de12b test(trip): specs for trip one-liner, description, banner & home gating
- trips-list.spec.js: one-liner presence/absence, retina srcset, cover
  fallback, alt text (U3).
- trip-header.spec.js: HTD stacking order, expandable description, banner
  fallback, split intact (U4).
- home.spec.js: AE7 — the gated trip-page extras never leak onto the home
  route (asserted mode-independently so it can't race the home-highlights
  suite that toggles travelling in a parallel worker).

Also marks the plan complete.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDS6t8wcpbwKvvrxykVQ5K
2026-07-06 00:02:48 +02:00
m038andClaude Opus 4.8 f4dbac6fc2 test(home,maps): skip travelling-gated H1/M8 with a stated reason
H1 (home journal feed) and M8 (home journey map source) only apply when
config.site.travelling is true — home.html.twig otherwise renders the
between-trips highlights grid, which has neither. They now detect that mode
(.home-highlights-title) and test.skip() with an explicit reason instead of
failing misleadingly, so they still run and validate whenever travelling is on.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mpdu3Dt1iVoozHwAMyjrbn
2026-07-05 23:42:55 +02:00
m038andClaude Opus 4.8 d3c17791b7 test(post-form): add edit/delete/anon coverage and fix stale photo-gate assumptions
New specs: edit-mode (ES1 save round-trip + ES2/ES3 prefill 404/500 states),
delete-flow (DEL1-3 happy/cancel/failed), anon-view (AN1 no owner controls,
AN2 draft hidden from anon), photo-editor (live add/delete/reorder). Existing:
P3-P8 now attach a photo to satisfy the create photo-gate; V3 picker cap 4->6.
Full post suite 38/38, stable across parallel (3-worker) runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mpdu3Dt1iVoozHwAMyjrbn
2026-07-05 23:42:45 +02:00
m038andClaude Opus 4.8 7534d7d178 test(post-form): expect zero-padded photo-01..NN filenames
The create path now routes through the shared PhotoRenumberer, which
zero-pads to photo-01..NN; update the Playwright assertions and title to
match the new naming.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 20:14:50 +02:00
m038andClaude Opus 4.8 c76c16b06d test(post-form): AE3 no longer references the removed hero field
The hero_image blueprint field was dropped (journal heroes come from the
first uploaded photo), so AE3 now asserts the More-options disclosure
toggles open/closed rather than probing the hero input's visibility.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 21:06:08 +02:00
m038andClaude Opus 4.8 45c2d54d2b test(post-form): assert 1–6 photo rule
Add a test for the ≥1-photo requirement (submit blocked with a photo-section
error) and the max of 6 (FilePond maxFiles). Rework AE4: a corrupt HEIC is the
only "photo", so fail-closed now means submit is blocked rather than posting a
text-only entry. Give the success-CTA test a photo so it can post under the new
rule.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 20:59:01 +02:00
m038andClaude Opus 4.8 edb1c7659c test(post-form): assert datetime-local picker, prefill, and required-date gate
Covers the theme datetime override: the date field renders as
<input type="datetime-local">, is prefilled with the current local time in
the native value format, and clearing it blocks submit client-side (no
success notice) — the guard that keeps an invalid date from wiping the
FilePond photo list on a server re-render.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 20:42:00 +02:00
m038andClaude Opus 4.8 0f88ec4694 test(post-form): assert photos are renamed photo-1..N with no frontmatter leak
Covers the reorder pipeline: two uploads produce photo-1.jpg/photo-2.jpg on the
posted entry, and the top-level photo_order POST key never appears in the entry
frontmatter. Adds a second image fixture so both slots are exercised.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 20:26:04 +02:00
m038andClaude Opus 4.8 d19a5802ae test(post-form): assert photo section auto-collapse + summary bar
Retarget AE1's completed-item assertion (the item is now hidden once the
section auto-collapses) to the "✓ N photo ready" summary, and add a spec
covering collapse-after-upload + re-expand on tap.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 19:47:00 +02:00
m038 ab5db71f35 test(post-form): assert post-success confirmation + view-journal CTA 2026-07-04 19:23:44 +02:00
m038 27a35a1db8 test(post-form): realign photo specs to FilePond after U4 rework
waitForPhotoUpload waits on FilePond processing-complete; AE1/AE4 use
input.filepond--browser + the .photo-convert-status error status; V3/V4 back
to FilePond limit + non-image rejection; reauth hint -> .photo-reauth-hint;
test-form-config asserts type:filepond. Verified against a live server via a
browser smoke run (HEIC->JPEG attach, corrupt fail-closed, draft restore).
2026-07-04 17:52:09 +02:00
m038 421c21345e test(post-form): retarget suite to redesigned /post + add UX coverage (U7)
- test-form-config.sh: assert parent is NOT hardcoded (injected server-side),
  active_trip set in site.yaml, and the new fields incl. custom 'photos' type.
- helpers.js: resolve active trip from site.active_trip (parent coupling gone);
  fillEditor() drives EasyMDE via window.postFormEditor; waitForPhotoUpload()
  waits on the new picker.
- post.spec / validation.spec: content via the editor, filepond selectors ->
  the photo picker, P8 checks editor value, V3/V4 exercise the picker cap +
  fail-closed non-image.
- post-form-ux.spec.js (new): AE3 disclosure, AE1 HEIC->JPEG, AE4 corrupt-HEIC
  fail-closed, R18 weather gating, R20 draft restore.
- fixtures: real + corrupt .heic.
- test-post.sh: resolve dailies dir from active_trip.

Refs AE1-AE4, R18, R20, U7.
2026-07-04 16:56:07 +02:00
m038andClaude Opus 4.8 7407129812 test: re-point suite off retired standalone views
Phase-1 fallout: delete tests for deleted pages, re-point moved-behavior
tests to the trip/home page where the content now lives.

- maps.spec: keep M4/M7/M8 (home+trip maps); drop M1-3,5,6,9-11 (/map,
  /dailies & /stories mini-maps)
- map-ux: re-point MUX4/5 sort toggle to #trip-sort-toggle on trip page
- nav: N1->trip page, N2->home, drop N3 (/stats) + N5 (obsolete skip)
- dailies: T1->trip page; T2->trip page with oldest-first assertion;
  fix T3-T6 stale entry-detail selectors (.entry-* -> .journal-post-*,
  pre-existing failures from an earlier entry redesign)
- stories: S1/S5 -> trip feed story cards ([data-type=story])
- gpx-journey: load MapUtils from the trip page instead of /map
- a11y: A4 photo strips -> trip page; drop AX3 (covered by AX2)
- post/helpers: verify posted entry on the trip page (ACTIVE_TRIP_URL)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 13:58:27 +02:00
m038 00d6bb0e37 test: add M9-M11 stories map + MUX1-5 panel/sort/fullscreen regression tests 2026-06-22 01:48:04 +02:00
m038andClaude Sonnet 4.6 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
m038andClaude Sonnet 4.6 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
m038andClaude Sonnet 4.6 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
m038andClaude Sonnet 4.6 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
m038andClaude Sonnet 4.6 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
m038andClaude Sonnet 4.6 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
m038andClaude Sonnet 4.6 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