From 05cf63087ebcd816107561095577816fde3a523e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Thu, 29 Feb 2024 08:27:59 +0000 Subject: [PATCH] test: fix tests --- uni/test/unit/view/Pages/exams_page_view_test.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uni/test/unit/view/Pages/exams_page_view_test.dart b/uni/test/unit/view/Pages/exams_page_view_test.dart index a5b64eb77..b8d52f718 100644 --- a/uni/test/unit/view/Pages/exams_page_view_test.dart +++ b/uni/test/unit/view/Pages/exams_page_view_test.dart @@ -50,7 +50,7 @@ void main() async { final providers = [ChangeNotifierProvider(create: (_) => examProvider)]; await tester.pumpWidget(testableWidget(widget, providers: providers)); - await tester.pump(); + await tester.pumpAndSettle(); expect(find.byKey(Key(firstExam.toString())), findsOneWidget); expect(find.byKey(Key('$firstExam-exam')), findsOneWidget); @@ -93,7 +93,7 @@ void main() async { final providers = [ChangeNotifierProvider(create: (_) => examProvider)]; await tester.pumpWidget(testableWidget(widget, providers: providers)); - await tester.pump(); + await tester.pumpAndSettle(); expect( find.byKey(Key(examList.map((ex) => ex.toString()).join())), @@ -139,7 +139,7 @@ void main() async { final providers = [ChangeNotifierProvider(create: (_) => examProvider)]; await tester.pumpWidget(testableWidget(widget, providers: providers)); - await tester.pump(); + await tester.pumpAndSettle(); expect(find.byKey(Key(firstExam.toString())), findsOneWidget); expect(find.byKey(Key(secondExam.toString())), findsOneWidget); @@ -208,7 +208,7 @@ void main() async { final providers = [ChangeNotifierProvider(create: (_) => examProvider)]; await tester.pumpWidget(testableWidget(widget, providers: providers)); - await tester.pump(); + await tester.pumpAndSettle(); expect(find.byKey(Key(firstDayKey)), findsOneWidget); expect(find.byKey(Key(secondDayKey)), findsOneWidget);