refactor: use duration variable

pull/217/head
Allison Ryan 3 years ago
parent 2bb6ed7347
commit 3af5825a92

@ -22,19 +22,20 @@ void main() {
await tester.pump(); await tester.pump();
}, },
verify: (game, tester) async { verify: (game, tester) async {
const animationDuration = 3.25;
await expectLater( await expectLater(
find.byGame<TestGame>(), find.byGame<TestGame>(),
matchesGoldenFile('golden/dash_animatronic/start.png'), matchesGoldenFile('golden/dash_animatronic/start.png'),
); );
game.update(0.8125); game.update(animationDuration * 0.25);
await tester.pump(); await tester.pump();
await expectLater( await expectLater(
find.byGame<TestGame>(), find.byGame<TestGame>(),
matchesGoldenFile('golden/dash_animatronic/middle.png'), matchesGoldenFile('golden/dash_animatronic/middle.png'),
); );
game.update(3.25); game.update(animationDuration * 0.75);
await tester.pump(); await tester.pump();
await expectLater( await expectLater(
find.byGame<TestGame>(), find.byGame<TestGame>(),

Loading…
Cancel
Save