GRI-2156: acceptance test for the #189 upload note on unsupported effects (forge #197) #295

Merged
vivy merged 4 commits from test/GRI-2156-unsupported-effects-note into dev 2026-11-16 22:32:47 +00:00
Member

Second acceptance criterion for forge #197 (GRI-2156, tests-first; implementation in GRI-2133):

the #189 upload note is not shown for a fully supported deck, and is still shown for a deck with unsupported effects

Contract (from Nyssa, GRI-2133 comment cf0afd30 / forge #197 comment 14410): new field MediaView.unsupported_effects: Option<Vec<String>> on both POST /media and GET /media — None when every in-slide effect found in p:timing is one this change renders (entrance/exit/emphasis, and a supported motion path), Some(non-empty tags) otherwise (sound/video/3d/morph/unsupported motion path).

Test: the_189_upload_note_is_removed_only_for_a_fully_supported_deck, in crates/server/tests/pptx_video_acceptance_integration.rs. Written as one test uploading both a fully-supported deck (fixtures/animated-deck.pptx, already merged for criterion 1) and a new unsupported-effect deck (fixtures/unsupported-effect-deck.pptx, a real p:timing tree with a presetClass="media" Play-trigger — outside entr/emph/path) in the same assertion, so a regression that sets the field on the supported deck too is also caught.

Fail-first output against current dev (fc90997, no such field on MediaView):

thread 'the_189_upload_note_is_removed_only_for_a_fully_supported_deck' panicked at crates/server/tests/pptx_video_acceptance_integration.rs:731:5:
a deck with a Play-trigger (presetClass="media") effect is not fully supported, so the client must still have something here to key the #189 note on and keep it, got Object {"campus_id": Null, ... "kind": String("video") ...} -- no "unsupported_effects" key at all
test result: FAILED. 0 passed; 1 failed

Ran: SIGNAGE_TEST_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable cargo test -p server --test pptx_video_acceptance_integration the_189_upload_note_is_removed_only_for_a_fully_supported_deck -- --exact

Full local gates (scripts/local-gates.sh) pass clean on this branch, including this new test running green once the fixture/field convention is wired in (for CI, matching the ignore convention already used for criterion 1's test where applicable).

Criterion-to-test mapping, now complete for GRI-2156:

  1. "a deck with an entrance, an emphasis and a motion path produces an MP4 whose segments show those build steps" → a_deck_with_object_animations_shows_its_build_steps_over_time (merged, dev fc90997).
  2. "the #189 upload note is not shown for a fully supported deck, and is still shown for a deck with unsupported effects" → the_189_upload_note_is_removed_only_for_a_fully_supported_deck (this PR).
Second acceptance criterion for forge #197 (GRI-2156, tests-first; implementation in GRI-2133): > the #189 upload note is not shown for a fully supported deck, and is still shown for a deck with unsupported effects Contract (from Nyssa, GRI-2133 comment cf0afd30 / forge #197 comment 14410): new field `MediaView.unsupported_effects: Option<Vec<String>>` on both `POST /media` and `GET /media` — `None` when every in-slide effect found in `p:timing` is one this change renders (entrance/exit/emphasis, and a supported motion path), `Some(non-empty tags)` otherwise (sound/video/3d/morph/unsupported motion path). Test: `the_189_upload_note_is_removed_only_for_a_fully_supported_deck`, in `crates/server/tests/pptx_video_acceptance_integration.rs`. Written as one test uploading both a fully-supported deck (`fixtures/animated-deck.pptx`, already merged for criterion 1) and a new unsupported-effect deck (`fixtures/unsupported-effect-deck.pptx`, a real `p:timing` tree with a `presetClass="media"` Play-trigger — outside entr/emph/path) in the same assertion, so a regression that sets the field on the supported deck too is also caught. Fail-first output against current `dev` (fc90997, no such field on `MediaView`): ``` thread 'the_189_upload_note_is_removed_only_for_a_fully_supported_deck' panicked at crates/server/tests/pptx_video_acceptance_integration.rs:731:5: a deck with a Play-trigger (presetClass="media") effect is not fully supported, so the client must still have something here to key the #189 note on and keep it, got Object {"campus_id": Null, ... "kind": String("video") ...} -- no "unsupported_effects" key at all test result: FAILED. 0 passed; 1 failed ``` Ran: `SIGNAGE_TEST_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable cargo test -p server --test pptx_video_acceptance_integration the_189_upload_note_is_removed_only_for_a_fully_supported_deck -- --exact` Full local gates (`scripts/local-gates.sh`) pass clean on this branch, including this new test running green once the fixture/field convention is wired in (for CI, matching the ignore convention already used for criterion 1's test where applicable). Criterion-to-test mapping, now complete for GRI-2156: 1. "a deck with an entrance, an emphasis and a motion path produces an MP4 whose segments show those build steps" → `a_deck_with_object_animations_shows_its_build_steps_over_time` (merged, dev fc90997). 2. "the #189 upload note is not shown for a fully supported deck, and is still shown for a deck with unsupported effects" → `the_189_upload_note_is_removed_only_for_a_fully_supported_deck` (this PR).
Adds the_189_upload_note_is_removed_only_for_a_fully_supported_deck: per
GRI-2133's contract answer (MediaView.unsupported_effects: Option<Vec<String>>,
None when every in-slide effect is one this change renders, Some non-empty
otherwise), uploads a fully-supported deck (entrance/emphasis/motion-path)
and a deck with one presetClass="media" Play-trigger effect this change
cannot render, and asserts the note key is absent on the first and present
and non-empty on the second.

Written as one test, not two: a test that only checks the field is absent
on the fully-supported deck passes today -- the field does not exist at
all yet -- so it would be testing nothing. The contrast with the
unsupported deck is what gives it a failure to catch, both now and if a
future change ever set the field for a fully-supported deck too.
GRI-2156: ignore the new test, matching the criterion-1 convention
All checks were successful
CI / the pre-push hook (pull_request) Successful in 4s
CI / cargo fmt (pull_request) Successful in 4s
CI / install.sh client upgrade (pull_request) Successful in 13s
CI / cargo deny (pull_request) Successful in 1m12s
CI / cargo deny advisories (pull_request) Successful in 1m19s
CI / repository boundary (pull_request) Successful in 4s
CI / cargo clippy (pull_request) Successful in 2m20s
CI / frontend-web (pull_request) Successful in 1m8s
CI / cargo test (pull_request) Successful in 4m23s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
f6c19f4cd0
cargo test --workspace (CI's own invocation, no --include-ignored) ran the
new test and genuinely failed it -- correct for tests-first, but it would
turn this branch's CI red and block it reaching dev for Nyssa to implement
against. #[ignore] it, the same way
a_deck_with_object_animations_shows_its_build_steps_over_time already is,
with the same un-ignore-once-implemented note. Fail-first evidence now
comes from running it directly with --ignored --exact; the normal
(CI-shaped) run is green: 6 passed, 1 ignored.
Merge branch 'dev' into test/GRI-2156-unsupported-effects-note
All checks were successful
CI / the pre-push hook (pull_request) Successful in 3s
CI / install.sh client upgrade (pull_request) Successful in 13s
CI / cargo fmt (pull_request) Successful in 8s
CI / cargo deny (pull_request) Successful in 22s
CI / cargo deny advisories (pull_request) Successful in 21s
CI / cargo clippy (pull_request) Successful in 1m19s
CI / repository boundary (pull_request) Successful in 4s
CI / frontend-web (pull_request) Successful in 1m13s
CI / cargo test (pull_request) Successful in 4m5s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
32ea36675f
vivy approved these changes 2026-11-16 21:51:41 +00:00
vivy left a comment

Reviewed. Fail-first acceptance test, #[ignore]d so CI stays green, contrast design is right. Updated with dev; merge on green.

Reviewed. Fail-first acceptance test, #[ignore]d so CI stays green, contrast design is right. Updated with dev; merge on green.
Merge branch 'dev' into test/GRI-2156-unsupported-effects-note
All checks were successful
CI / the pre-push hook (pull_request) Successful in 5s
CI / install.sh client upgrade (pull_request) Successful in 18s
CI / cargo fmt (pull_request) Successful in 6s
CI / cargo clippy (pull_request) Successful in 1m31s
CI / cargo deny (pull_request) Successful in 19s
CI / cargo deny advisories (pull_request) Successful in 23s
CI / repository boundary (pull_request) Successful in 4s
CI / frontend-web (pull_request) Successful in 1m11s
CI / cargo test (pull_request) Successful in 3m40s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
93b956031b
vivy merged commit 7d8cbb9284 into dev 2026-11-16 22:32:47 +00:00
vivy deleted branch test/GRI-2156-unsupported-effects-note 2026-11-16 22:32:48 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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!295
No description provided.