From 3af5825a929b3f7007a4d284c91e41e1e0cc9f7d Mon Sep 17 00:00:00 2001 From: Allison Ryan Date: Thu, 21 Apr 2022 21:22:54 -0500 Subject: [PATCH] refactor: use duration variable --- .../test/src/components/dash_animatronic_test.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/pinball_components/test/src/components/dash_animatronic_test.dart b/packages/pinball_components/test/src/components/dash_animatronic_test.dart index d59e0725..8b5d0e30 100644 --- a/packages/pinball_components/test/src/components/dash_animatronic_test.dart +++ b/packages/pinball_components/test/src/components/dash_animatronic_test.dart @@ -22,19 +22,20 @@ void main() { await tester.pump(); }, verify: (game, tester) async { + const animationDuration = 3.25; await expectLater( find.byGame(), matchesGoldenFile('golden/dash_animatronic/start.png'), ); - game.update(0.8125); + game.update(animationDuration * 0.25); await tester.pump(); await expectLater( find.byGame(), matchesGoldenFile('golden/dash_animatronic/middle.png'), ); - game.update(3.25); + game.update(animationDuration * 0.75); await tester.pump(); await expectLater( find.byGame(),