Skip to content

Commit

Permalink
Test less exercises
Browse files Browse the repository at this point in the history
  • Loading branch information
a-mabe committed Jul 28, 2023
1 parent f0ca939 commit 380715d
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions test/workout_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 380715d

Please sign in to comment.