Update stale desk and snapshot tests to current behavior #14

Merged
arne merged 1 commit from orbit-13-fix-stale-desk-tests into main 2026-06-15 22:02:24 +02:00
Owner

Four tests fail on main, all stale relative to intentional code changes — no product bug.

Root causes & fixes

  • TestDB_SnapshotArticlesSnapshotArticles filters content != '' (eea4578). Give the articles content.
  • TestServer_DeskSnapshots / _HTMX/desk/snapshots now 302-redirects to per-outlet /desk/snapshots/{site} (8b622e0). Hit that URL, align to the 10-min snapshot tick, give the article content, and trigger the HTMX partial via HX-Target: snapshot-panel (the handler's actual contract).
  • TestServer_DeskBreaking/desk was rebuilt from a 'Breaking' list into the 'Kandidater' ranking view (ab324d7). Set up a qualifying candidate (pre-cutoff snapshot at 05:00 today, summary, non-empty keywords) and rename to TestServer_DeskKandidater. The 05:00 snapshot is at/before either edition cutoff (06:00/18:00) and within 24h of both, so it qualifies regardless of run time.

Verification

go test ./... is fully green.

Closes #13

Four tests fail on `main`, all stale relative to intentional code changes — no product bug. ## Root causes & fixes - **TestDB_SnapshotArticles** — `SnapshotArticles` filters `content != ''` (eea4578). Give the articles content. - **TestServer_DeskSnapshots / _HTMX** — `/desk/snapshots` now 302-redirects to per-outlet `/desk/snapshots/{site}` (8b622e0). Hit that URL, align to the 10-min snapshot tick, give the article content, and trigger the HTMX partial via `HX-Target: snapshot-panel` (the handler's actual contract). - **TestServer_DeskBreaking** — `/desk` was rebuilt from a 'Breaking' list into the 'Kandidater' ranking view (ab324d7). Set up a qualifying candidate (pre-cutoff snapshot at 05:00 today, summary, non-empty keywords) and rename to **TestServer_DeskKandidater**. The 05:00 snapshot is at/before either edition cutoff (06:00/18:00) and within 24h of both, so it qualifies regardless of run time. ## Verification `go test ./...` is fully green. Closes #13
Four tests failed against intentional changes they were never updated
for; none reflect a product bug.

- SnapshotArticles excludes content-less articles, so give the test
  articles content (TestDB_SnapshotArticles).
- /desk/snapshots now redirects to the per-outlet /desk/snapshots/{site};
  hit that URL, align times to the 10-minute snapshot tick, give the
  article content, and trigger the HTMX partial via HX-Target rather than
  HX-Request (TestServer_DeskSnapshots, _HTMX).
- /desk is now the Kandidater ranking view; set up a qualifying candidate
  (pre-cutoff snapshot, summary, non-empty keywords) and rename the test
  accordingly (TestServer_DeskBreaking -> TestServer_DeskKandidater).

Closes #13

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
arne merged commit bcce6596fe into main 2026-06-15 22:02:24 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
arne/news!14
No description provided.