From 380715dc839c0d9e115ef8237f027fbc5467e7da Mon Sep 17 00:00:00 2001 From: a-mabe Date: Thu, 27 Jul 2023 20:36:08 -0400 Subject: [PATCH] Test less exercises --- test/workout_test.dart | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/test/workout_test.dart b/test/workout_test.dart index 514f6fe..f815eae 100644 --- a/test/workout_test.dart +++ b/test/workout_test.dart @@ -42,20 +42,14 @@ void main() { // Verify the exercise number defaults to 10. expect(find.text('10'), findsOneWidget); - // Reduce the number of exercises by 1. - await tester.tap(find.byIcon(Icons.remove)); - await tester.pumpAndSettle(); - - // Reduce the number of exercises by 1. - await tester.tap(find.byIcon(Icons.remove)); - await tester.pumpAndSettle(); - - // Reduce the number of exercises by 1. - await tester.tap(find.byIcon(Icons.remove)); - await tester.pumpAndSettle(); + for (var i = 0; i < 8; i++) { + // Reduce the number of exercises by 1. + await tester.tap(find.byIcon(Icons.remove)); + await tester.pumpAndSettle(); + } - // Verify the exercise number is 7 as expected. - expect(find.text('7'), findsOneWidget); + // Verify the exercise number is 2 as expected. + expect(find.text('2'), findsOneWidget); // Tap to go to the next page. await tester.tap(find.byType(ElevatedButton));