test: cover keyframe value predicates and assert committed slider state - #150
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test-only follow-up to the opacity keyframe work. No source changes.
What changed
tests/clip-utils.test.ts(new) — coversisKeyframedValueandhasKeyframedVisualProperty, which had no tests. Both are now the single source of truth for "this value is animated or bound, so a scalar write would destroy it", used by the player, the media toolbar and the canvas selection handles. Cases:0andundefinedstay editable, tweens and unresolved{{ MERGE_FIELD }}placeholders do not, each of the seven visual properties trips the clip-level check, and a keyframedasset.volumedeliberately does not.tests/svg-toolbar.test.ts— repairs an assertion that could not fail. "keeps document timing intent in slider undo history" stubbedupdateClipInDocumentto a no-op whilegetDocumentClipreturned the same object every call, so the committed final state was byte-identical to the initial state. It passed whether or not the slider edit reached the commit. The mock now mutates the document, and the test asserts both that the edit landed and that the state is still document form rather than resolved.How to verify
npx jest tests/clip-utils.test.ts tests/svg-toolbar.test.ts— 41 tests. Full suite: 70 suites, 1947 tests.test:type, so no release is cut.