GRI-1856: independent acceptance tests for playlist routes #101

Merged
vivy merged 2 commits from test/GRI-1856-playlist-acceptance-tests into dev 2026-11-10 03:01:41 +00:00
Member

Independent acceptance tests for the playlist routes (GRI-1874, PR #99), not derived from the implementer's own playlist_integration.rs.

Criterion-to-test mapping (plan/tests/mvp-acceptance.md section 4; AC-4-01 is E2E, out of scope here):

  • ac_4_02_item_duration_override_beats_playlist_default — an item's duration override wins over the playlist default; a non-overridden item keeps the playlist default.
  • ac_4_03_empty_playlist_assignment_is_accepted_not_refused — assigning a zero-item playlist to a device returns 200, not an error.

Fail-first, verified by temporarily breaking each contract in the implementation and reverting:

  • AC-4-02: forced ItemView::duration_seconds to always None → test failed with left: Null, right: 5.
  • AC-4-03: added a bad_request guard on empty items in assign_playlist → test failed with left: 400, right: 200.
cargo test -p server --test playlist_acceptance_integration -- --test-threads=1
test ac_4_02_item_duration_override_beats_playlist_default ... ok
test ac_4_03_empty_playlist_assignment_is_accepted_not_refused ... ok
test result: ok. 2 passed; 0 failed

./scripts/local-gates.sh: all gates passed (one cargo fmt fixup folded in as a separate commit).

Independent acceptance tests for the playlist routes (GRI-1874, PR #99), not derived from the implementer's own `playlist_integration.rs`. Criterion-to-test mapping (`plan/tests/mvp-acceptance.md` section 4; AC-4-01 is E2E, out of scope here): - `ac_4_02_item_duration_override_beats_playlist_default` — an item's duration override wins over the playlist default; a non-overridden item keeps the playlist default. - `ac_4_03_empty_playlist_assignment_is_accepted_not_refused` — assigning a zero-item playlist to a device returns 200, not an error. Fail-first, verified by temporarily breaking each contract in the implementation and reverting: - AC-4-02: forced `ItemView::duration_seconds` to always `None` → test failed with `left: Null, right: 5`. - AC-4-03: added a `bad_request` guard on empty items in `assign_playlist` → test failed with `left: 400, right: 200`. ``` cargo test -p server --test playlist_acceptance_integration -- --test-threads=1 test ac_4_02_item_duration_override_beats_playlist_default ... ok test ac_4_03_empty_playlist_assignment_is_accepted_not_refused ... ok test result: ok. 2 passed; 0 failed ``` `./scripts/local-gates.sh`: all gates passed (one `cargo fmt` fixup folded in as a separate commit).
GRI-1856: cargo fmt
Some checks failed
CI / the pre-push hook (pull_request) Successful in 11s
CI / cargo fmt (pull_request) Successful in 11s
CI / cargo deny (pull_request) Successful in 1m44s
CI / cargo deny advisories (pull_request) Failing after 1m24s
CI / repository boundary (pull_request) Successful in 7s
CI / cargo clippy (pull_request) Successful in 10m18s
CI / cargo test (pull_request) Successful in 10m56s
CI / frontend-web (pull_request) Successful in 10m19s
CI / CI (pull_request) Successful in 5s
CI / Notify gate failed (pull_request) Has been skipped
4a1f648198
vivy merged commit 1e8c190e4f into dev 2026-11-10 03:01:41 +00:00
vivy deleted branch test/GRI-1856-playlist-acceptance-tests 2026-11-10 03:01:41 +00:00
Sign in to join this conversation.
No reviewers
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
Grimoirix/grimoire-of-digital-signage!101
No description provided.