From 43b00a8a02350962408fe4d638a59a5610b467de Mon Sep 17 00:00:00 2001 From: Noel Bastubbe Date: Mon, 1 Aug 2022 12:04:20 +0200 Subject: [PATCH] Fixed the following tests: testMovingLineStoppedAtEndMargin, testMovingLineInRightPosition, testHeightOfTimeline. Therefore changed the minimumExtent of the timeline. This change explains the other changes in the tests: testDistanceBetweenKeyframes and testAddKeyframeToRightPosition --- .../AnimationsEditor.class/methodProperties.json | 2 +- .../instance/animationDuration.st | 2 +- .../methodProperties.json | 2 +- .../instance/minimumExtent.st | 2 +- .../instance/updateStartEndProperty.st | 2 +- .../methodProperties.json | 4 ++-- .../instance/middleOfAnimationTime.st | 2 +- .../instance/testAddKeyframeToRightPosition.st | 11 ++++------- .../instance/testDistanceBetweenKeyframes.st | 6 ++---- .../instance/testHeightOfTimeline.st | 8 ++------ .../instance/testMovingLineInRightPosition.st | 5 ++--- .../instance/testMovingLineStoppedAtEndMargin.st | 6 +++--- .../methodProperties.json | 12 ++++++------ 13 files changed, 27 insertions(+), 37 deletions(-) diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditor.class/methodProperties.json b/packages/AnimationsEditor-Core.package/AnimationsEditor.class/methodProperties.json index 59774bd..0b1967e 100644 --- a/packages/AnimationsEditor-Core.package/AnimationsEditor.class/methodProperties.json +++ b/packages/AnimationsEditor-Core.package/AnimationsEditor.class/methodProperties.json @@ -16,7 +16,7 @@ "buildInformationBarWith:" : "DM 8/4/2020 16:12", "buildLoadJsonButtonWith:" : "FH 8/1/2021 18:37", "buildLoadingMainWindow:" : "SG 5/21/2022 13:24", - "buildMainWindowWith:" : "SG 5/21/2022 14:11", + "buildMainWindowWith:" : "Noel Bastubbe 8/1/2022 10:59", "buildPlayButtonWith:" : "FH 8/1/2021 18:39", "buildPositionUIPanelWith:" : "FH 8/1/2021 18:39", "buildPropertiesTreeWith:" : "ob 7/12/2022 18:57", diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/animationDuration.st b/packages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/animationDuration.st index a8e0c31..6259e97 100644 --- a/packages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/animationDuration.st +++ b/packages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/animationDuration.st @@ -1,3 +1,3 @@ accessing animationDuration - ^ self timeline endTime - self timeline startTime. \ No newline at end of file + ^ self timeline endTime max: self timeline minimumExtent \ No newline at end of file diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/methodProperties.json b/packages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/methodProperties.json index 43e07b9..9ff6100 100644 --- a/packages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/methodProperties.json +++ b/packages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/methodProperties.json @@ -2,7 +2,7 @@ "class" : { "on:withExtent:" : "NR 7/18/2022 11:25" }, "instance" : { - "animationDuration" : "ob 6/9/2022 21:31", + "animationDuration" : "Noel Bastubbe 8/1/2022 10:36", "initialize" : "NR 7/18/2022 11:26", "lineWidth" : "ob 6/9/2022 20:18", "playMovingAnimation" : "NR 7/18/2022 11:34" } } diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/instance/minimumExtent.st b/packages/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/instance/minimumExtent.st index 6f9b121..e1fa40b 100644 --- a/packages/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/instance/minimumExtent.st +++ b/packages/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/instance/minimumExtent.st @@ -1,4 +1,4 @@ constants minimumExtent - ^ 1000. \ No newline at end of file + ^ self animationsEditor informationBar width - self startMargin - self endMargin - (self animationsEditor informationBar borderWidth * 2). \ No newline at end of file diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/instance/updateStartEndProperty.st b/packages/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/instance/updateStartEndProperty.st index ae43a9d..5c2f4f0 100644 --- a/packages/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/instance/updateStartEndProperty.st +++ b/packages/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/instance/updateStartEndProperty.st @@ -3,7 +3,7 @@ updateStartEndProperty | startEndProperty | startEndProperty := self animationsEditor propertyStartEnd. - startEndProperty property: self property. "<--- Ich vermute, dass diese Zeile nicht ausgeführt wird und dadurch den Defekt erzeugt." + startEndProperty property: self property. self property subproperties do:[:subproperty | subproperty addDependent: startEndProperty]. diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/methodProperties.json b/packages/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/methodProperties.json index 6c146d7..58cd3da 100644 --- a/packages/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/methodProperties.json +++ b/packages/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/methodProperties.json @@ -16,7 +16,7 @@ "initialExtent" : "MH 8/1/2021 18:57", "initialize" : "NR 7/18/2022 11:31", "initializeStartEndTime" : "mjs 7/31/2021 17:38", - "minimumExtent" : "NR 7/18/2022 10:43", + "minimumExtent" : "Noel Bastubbe 8/1/2022 11:55", "movingLine" : "SG 5/21/2022 15:38", "movingLine:" : "SG 5/21/2022 15:38", "property" : "MH 8/1/2021 18:57", @@ -31,4 +31,4 @@ "trackHeight" : "MH 8/1/2021 18:57", "update:" : "SG 5/23/2022 18:40", "updateExtent" : "NR 7/18/2022 10:41", - "updateStartEndProperty" : "6/17/2022 14:09:28" } } + "updateStartEndProperty" : "Noel Bastubbe 8/1/2022 10:56" } } diff --git a/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/middleOfAnimationTime.st b/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/middleOfAnimationTime.st index f99b617..24445c6 100644 --- a/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/middleOfAnimationTime.st +++ b/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/middleOfAnimationTime.st @@ -1,4 +1,4 @@ constants middleOfAnimationTime - ^ (self endFrame max: 1000) / 2. \ No newline at end of file + ^ (self timeline minimumExtent / 2) truncated. \ No newline at end of file diff --git a/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testAddKeyframeToRightPosition.st b/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testAddKeyframeToRightPosition.st index c7e3f93..aaf29b2 100644 --- a/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testAddKeyframeToRightPosition.st +++ b/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testAddKeyframeToRightPosition.st @@ -1,13 +1,10 @@ testing testAddKeyframeToRightPosition - | keyframeCenter keyframeBar keyframeBarPosition addedKeyframeMorph | - - keyframeBar := (self positionTrack submorphs at: 2). - - keyframeBarPosition := keyframeBar position. + | keyframeCenter middleOfKeyframeBar keyframeBarPosition addedKeyframeMorph | + keyframeBarPosition := self positionTrack position. + middleOfKeyframeBar := keyframeBarPosition + (self middleOfAnimationTime @ (self positionTrack height / 2)) + (self timeline startMargin @ 0). self createKeyframeWith: self animationPosition on: self middleOfAnimationTime. - addedKeyframeMorph := self positionTrack submorphs first. keyframeCenter := addedKeyframeMorph center. - self assert: ((keyframeBar width / 2) @ (keyframeBar height / 2) + keyframeBarPosition) truncated = keyframeCenter. \ No newline at end of file + self assert: middleOfKeyframeBar truncated = keyframeCenter. \ No newline at end of file diff --git a/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testDistanceBetweenKeyframes.st b/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testDistanceBetweenKeyframes.st index a4940d4..c394fec 100644 --- a/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testDistanceBetweenKeyframes.st +++ b/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testDistanceBetweenKeyframes.st @@ -1,12 +1,10 @@ testing testDistanceBetweenKeyframes - | frameDistance distanceBetweenKeyframes startKeyframeMorph addedKeyframeMorph keyframeBar | + | frameDistance distanceBetweenKeyframes startKeyframeMorph addedKeyframeMorph | self createKeyframeWith: self animationPosition on: self frameNumber1000. - keyframeBar := (self positionTrack submorphs at: (self secondLastOn: self positionTrack)). frameDistance := self frameNumber1000 - self startFrame. addedKeyframeMorph := self positionTrack submorphs first. startKeyframeMorph := self positionTrack submorphs second. distanceBetweenKeyframes := addedKeyframeMorph bounds origin - startKeyframeMorph bounds origin. - - self assert: (keyframeBar width - self paddingDistance) // (self endFrame / frameDistance) = distanceBetweenKeyframes x. \ No newline at end of file + self assert: frameDistance = distanceBetweenKeyframes x. \ No newline at end of file diff --git a/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testHeightOfTimeline.st b/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testHeightOfTimeline.st index 1239f63..601cdc8 100644 --- a/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testHeightOfTimeline.st +++ b/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testHeightOfTimeline.st @@ -1,13 +1,9 @@ testing testHeightOfTimeline -"| oldHeight scrollBarThickness offScreenFrame | +| oldHeight scrollBarThickness offScreenFrame | offScreenFrame := self animationsEditorInstance mainWindow width. - self animationsEditorInstance propertyStartEnd endTime: 0. oldHeight := self timeline height. self createKeyframeWith: self animationPosition on: offScreenFrame. scrollBarThickness := self timeline scrollPane scrollBarThickness. - self assert: oldHeight - scrollBarThickness = self timeline height." - "self expected: self failure." - - self assert: true. \ No newline at end of file + self assert: oldHeight - scrollBarThickness = self timeline height. \ No newline at end of file diff --git a/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testMovingLineInRightPosition.st b/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testMovingLineInRightPosition.st index b1ce069..afa82bb 100644 --- a/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testMovingLineInRightPosition.st +++ b/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testMovingLineInRightPosition.st @@ -1,6 +1,6 @@ testing testMovingLineInRightPosition -" + self timeline createMovingLine. self movingLine: self timeline movingLine. self @@ -10,8 +10,7 @@ testMovingLineInRightPosition wait: 250; assert: (self movingLine position x rounded between: (self movingLine startMargin + 499) and: (self movingLine startMargin + 501)); wait: 250; - assert: (self movingLine position x rounded between: (self movingLine startMargin + 749) and: (self movingLine startMargin + 751))." - self assert: true. + assert: (self movingLine position x rounded between: (self movingLine startMargin + 749) and: (self movingLine startMargin + 751)). diff --git a/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testMovingLineStoppedAtEndMargin.st b/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testMovingLineStoppedAtEndMargin.st index 93f4c0d..6982f49 100644 --- a/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testMovingLineStoppedAtEndMargin.st +++ b/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testMovingLineStoppedAtEndMargin.st @@ -1,8 +1,8 @@ testing testMovingLineStoppedAtEndMargin - "self timeline createMovingLine. + + self timeline createMovingLine. self movingLine: self timeline movingLine. self wait: 1500; - should: self movingLine position x = (self movingLine startMargin + 1000)." - self assert: true. + should: self movingLine position x = (self movingLine startMargin + self timeline minimumExtent). diff --git a/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/methodProperties.json b/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/methodProperties.json index 742e0b0..a9f758d 100644 --- a/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/methodProperties.json +++ b/packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/methodProperties.json @@ -13,7 +13,7 @@ "inaccuracyFactor" : "ob 6/9/2022 20:56", "keyframeHeightOn:" : "NB 8/1/2021 14:07", "keyframeWidthOn:" : "NB 8/1/2021 14:07", - "middleOfAnimationTime" : "NR 7/18/2022 11:10", + "middleOfAnimationTime" : "Noel Bastubbe 8/1/2022 11:21", "moveMovingLine:" : "NR 7/18/2022 11:08", "movingLine" : "ob 5/27/2022 16:57", "movingLine:" : "ob 5/27/2022 16:57", @@ -29,14 +29,14 @@ "startFrame" : "MH 8/1/2021 18:42", "startMargin" : "ob 5/29/2022 17:46", "tearDown" : "SG 6/22/2022 14:15", - "testAddKeyframeToRightPosition" : "Noel Bastubbe 6/13/2022 19:27", - "testDistanceBetweenKeyframes" : "NR 7/18/2022 11:14", + "testAddKeyframeToRightPosition" : "Noel Bastubbe 8/1/2022 11:47", + "testDistanceBetweenKeyframes" : "Noel Bastubbe 8/1/2022 11:52", "testDurationDisplay" : "7/1/2022 15:59:00", - "testHeightOfTimeline" : "NR 7/18/2022 18:29", + "testHeightOfTimeline" : "Noel Bastubbe 8/1/2022 11:00", "testMinWidthOfTimeline" : "NR 7/18/2022 11:12", - "testMovingLineInRightPosition" : "NR 7/18/2022 11:50", + "testMovingLineInRightPosition" : "Noel Bastubbe 8/1/2022 10:24", "testMovingLineInitializedInRightPosition" : "NR 7/18/2022 11:40", - "testMovingLineStoppedAtEndMargin" : "NR 7/18/2022 11:51", + "testMovingLineStoppedAtEndMargin" : "Noel Bastubbe 8/1/2022 11:12", "testWidthOfTimeline" : "NR 7/18/2022 11:11", "testZeroDurationAtStart" : "ob 7/30/2022 17:38", "timebar" : "ob 7/30/2022 17:35",