Skip to content

Commit

Permalink
tests for module Keyframes are complete
Browse files Browse the repository at this point in the history
  • Loading branch information
saragrau committed Aug 2, 2022
1 parent 8ca512c commit 867461d
Show file tree
Hide file tree
Showing 31 changed files with 47 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
accessing
property

^self track property.
|targetMorph property parentProperty propertyList|

parentProperty := self track property parentProperty title.
propertyList := self animationsEditor propertyList.
targetMorph := propertyList detect: [:each | parentProperty match: each title].


targetMorph hasSubproperties
ifTrue: [property := targetMorph subproperties detect: [:each| self track property asString match: each asString]].
^property
"^self track property."


Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
value
^ value
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
"initialize" : "NR 7/18/2022 10:50",
"mouseDown:" : "SG 7/31/2022 18:41",
"mouseOverColor" : "NR 7/18/2022 10:49",
"property" : "SG 7/31/2022 18:41",
"property" : "SG 8/1/2022 09:50",
"setCenteredPosition:" : "FH 8/1/2021 19:04",
"setValueAndFrame" : "SG 7/31/2022 18:44",
"track" : "mjs 7/31/2021 15:46",
"track:" : "mjs 7/31/2021 15:46",
"value" : "SG 8/1/2022 09:29",
"value:" : "mjs 7/31/2021 15:46" } }
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ addKeyframes
withFrame: key
withValue: value
withAnimationsEditor: self animationsEditor.
self addMorph: keyframeMorph].
self addMorph: keyframeMorph].


Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"class" : {
"on:withProperty:withPosition:withExtent:withAnimationsEditor:" : "SG 6/17/2022 15:45" },
"instance" : {
"addKeyframes" : "SG 6/17/2022 15:46",
"addKeyframes" : "SG 8/2/2022 08:26",
"animationsEditor" : "SG 6/17/2022 15:40",
"animationsEditor:" : "SG 6/17/2022 15:40",
"initialize" : "ob 6/13/2022 13:20",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
support
selectKeyframe100

self keyframe100 setValueAndFrame.
self animationsEditorInstance selectedTreeNode: self keyframe100 property.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ setUp
self morph: Morph new openInWorld.
self animationsEditorInstance addTargetMorph: self morph.
self timeline: self animationsEditorInstance timeline.
"self property: self animationsEditor propertyList first. "
self propertyRotation isActivated: true.
self animationsEditorInstance selectedTreeNode: self propertyRotation.
self rotationTrack: (self timeline submorphs at: 2).
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
testing
testChangeSelectedKeyframeValue
| sizeBeforeChange oldValue oldTargetValues|

self selectKeyframe100.

sizeBeforeChange := self propertyRotation targetValues size.
oldValue := self propertyRotation targetValues at: (self frameNumber100).
oldTargetValues := self propertyRotation targetValues deepCopy.
self createKeyframeWith: self animationRotation200 on: self frameNumber100.

self assert: sizeBeforeChange = self propertyRotation targetValues size.
self deny: oldValue equals: (self propertyRotation targetValues at: self frameNumber100).
self deny: oldTargetValues equals: self propertyRotation targetValues.
self assert: (oldTargetValues removeKey: self frameNumber100; yourself) equals: (self propertyRotation targetValues removeKey: self frameNumber100; yourself).

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
testing
testLeftClickShowsSelectedProperty

self keyframe100 setValueAndFrame.
self animationsEditorInstance selectedTreeNode: self keyframe100 property.
self selectKeyframe100.

self assert: self propertyRotation currentValue = self animationRotation100.
self assert: self propertyRotation targetFrame = self frameNumber100.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
"propertyRotation" : "lka 7/1/2022 15:34",
"rotationTrack" : "SG 7/31/2022 23:14",
"rotationTrack:" : "SG 7/31/2022 23:14",
"setUp" : "SG 7/31/2022 23:21",
"selectKeyframe100" : "SG 8/2/2022 08:28",
"setUp" : "SG 8/1/2022 09:41",
"tearDown" : "SG 7/31/2022 23:22",
"testLeftClickShowsSelectedProperty" : "SG 7/31/2022 23:18",
"testChangeSelectedKeyframeValue" : "SG 8/2/2022 09:22",
"testLeftClickShowsSelectedProperty" : "SG 8/2/2022 08:29",
"timeline" : "SG 7/31/2022 22:46",
"timeline:" : "SG 7/31/2022 22:46" } }
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"rotationTrack",
"keyframe100",
"keyframe200" ],
"name" : "AnimationsEditorRightclickSelection",
"name" : "AnimationsEditorKeyframeTest",
"pools" : [
],
"super" : "TestCase",
Expand Down

0 comments on commit 867461d

Please sign in to comment.