Skip to content

Commit

Permalink
test: fix widget tests left timers
Browse files Browse the repository at this point in the history
  • Loading branch information
B0berman committed Feb 29, 2024
1 parent 9d09c7a commit 3729678
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion test/app/view/app_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ void main() {
group('App', () {
testWidgets('renders AppView', (tester) async {
await tester.pumpWidget(const App());
await tester.pumpAndSettle(const Duration(milliseconds: 200));
await tester.pumpAndSettle();
await tester.pump(const Duration(milliseconds: 700));
expect(find.byType(AppView), findsOneWidget);
});
});
Expand Down
4 changes: 1 addition & 3 deletions test/loading/view/loading_page_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,9 @@ void main() {
await tester.pump(const Duration(milliseconds: 200));

expect(textWidgetFinder().data, 'Loading Beautiful scenery...');
await tester.pump(const Duration(milliseconds: 500));
// await tester.pump(const Duration(milliseconds: 300));

/// flush animation timers
// await tester.pumpAndSettle(const Duration(milliseconds: 400));
await tester.pump(const Duration(milliseconds: 500));
});

testWidgets('redirects after loading', (tester) async {
Expand Down

0 comments on commit 3729678

Please sign in to comment.