test(documents): timeline density Playwright coverage #480

Open
opened 2026-05-08 10:12:20 +02:00 by marcel · 0 comments
Owner

Context

Spun out of PR #478 (issue #385). Sara's QA review and Elicit's requirements review both flagged that the user-facing claim of issue #385 — click-to-filter, drag-to-zoom-and-filter, reset-zoom, mobile/calendar hide — has zero Playwright proof against a real backend. The component-level specs synthesise PointerEvents but do not exercise the document-level pointermove listener path that the implementation uses for off-bar drags.

"The current PR ships with the promise of correctness, not the proof."
— Elicit, on PR #478

Acceptance criteria

  • frontend/e2e/documents-timeline.spec.ts exists and runs in CI.
  • Click filter: clicking a timeline bar narrows the document list and updates the URL with from/to.
  • Drag-to-zoom: dragging from bar A to bar B updates the URL with both from/to AND zoomFrom/zoomTo in a single navigation.
  • Reset-zoom: clicking the ↩ button preserves the active filter (from/to) and drops zoomFrom/zoomTo from the URL.
  • Sender-filter refetch: adding a sender filter triggers a density refetch and the bars rescale.
  • Year click in year-mode: clicking a single year bar in year-aggregation mode rerenders the timeline with month bars labelled Jan Feb Mär….
  • Mobile hide: at viewport width < 1024px the timeline widget is not in the DOM and the density fetch does not fire.
  • ?view=calendar hides the widget regardless of viewport.

Notes for the implementer

  • Existing test infra: frontend/e2e/ already has Playwright + the dev-stack spin-up.
  • Use the seeded dev archive (admin@familyarchive.local / admin123) for stable bar counts.
  • The drag-to-zoom test must exercise the document-level pointermove path, not just bar-to-bar pointer events. Use page.mouse.down()page.mouse.move()page.mouse.up() so off-bar movement is covered.
## Context Spun out of [PR #478](http://heim-nas:3005/marcel/familienarchiv/pulls/478) (issue #385). Sara's QA review and Elicit's requirements review both flagged that the user-facing claim of issue #385 — click-to-filter, drag-to-zoom-and-filter, reset-zoom, mobile/calendar hide — has zero Playwright proof against a real backend. The component-level specs synthesise PointerEvents but do not exercise the document-level `pointermove` listener path that the implementation uses for off-bar drags. > "The current PR ships with the *promise* of correctness, not the *proof*." > — Elicit, on PR #478 ## Acceptance criteria - [ ] `frontend/e2e/documents-timeline.spec.ts` exists and runs in CI. - [ ] **Click filter:** clicking a timeline bar narrows the document list and updates the URL with `from`/`to`. - [ ] **Drag-to-zoom:** dragging from bar A to bar B updates the URL with both `from`/`to` AND `zoomFrom`/`zoomTo` in a single navigation. - [ ] **Reset-zoom:** clicking the ↩ button preserves the active filter (`from`/`to`) and drops `zoomFrom`/`zoomTo` from the URL. - [ ] **Sender-filter refetch:** adding a sender filter triggers a density refetch and the bars rescale. - [ ] **Year click in year-mode:** clicking a single year bar in year-aggregation mode rerenders the timeline with month bars labelled `Jan Feb Mär…`. - [ ] **Mobile hide:** at viewport width < 1024px the timeline widget is not in the DOM and the density fetch does not fire. - [ ] `?view=calendar` hides the widget regardless of viewport. ## Notes for the implementer - Existing test infra: `frontend/e2e/` already has Playwright + the dev-stack spin-up. - Use the seeded dev archive (admin@familyarchive.local / admin123) for stable bar counts. - The drag-to-zoom test must exercise the document-level pointermove path, not just bar-to-bar pointer events. Use `page.mouse.down()` → `page.mouse.move()` → `page.mouse.up()` so off-bar movement is covered. ## Related - Parent issue: #385 - Parent PR: #478 (deferred this scope per Felix's discussion with the user) - Sibling follow-up: `feat(documents): keyboard-accessible range zoom for timeline`
marcel added the test label 2026-05-08 10:12:28 +02:00
Sign in to join this conversation.
No Label test
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marcel/familienarchiv#480