-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
77 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import 'dart:ui'; | ||
|
||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:integration_test/integration_test.dart'; | ||
|
||
import 'functions.dart'; | ||
|
||
void main() { | ||
final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized(); | ||
binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fullyLive; | ||
|
||
const String workoutName = 'Test Workout'; | ||
const String workoutName2 = 'Test Workout Edited'; | ||
|
||
group('end-to-end test', () { | ||
testWidgets('create a workout', (tester) async { | ||
await loadApp(tester); | ||
await binding.setSurfaceSize(const Size(1080, 2400)); | ||
await navigateToAddWorkoutOrTimer(tester, true); | ||
await createWorkout(tester, workoutName); | ||
}); | ||
testWidgets('run a workout and restart', (tester) async { | ||
await loadApp(tester); | ||
await verifyWorkoutOrTimerOpens(tester, workoutName); | ||
await runWorkoutOne(tester, binding); | ||
}); | ||
testWidgets('edit workout', (tester) async { | ||
await loadApp(tester); | ||
await verifyWorkoutOrTimerOpens(tester, workoutName); | ||
await editWorkout(tester, workoutName2); | ||
}); | ||
testWidgets('run an edited workout and restart', (tester) async { | ||
await loadApp(tester); | ||
await verifyWorkoutOrTimerOpens(tester, workoutName2); | ||
await runWorkoutTwo(tester); | ||
}); | ||
}); | ||
} |