Commit 46287d5

derdilla <82763757+NobodyForNothing@users.noreply.github.com>
2024-04-08 17:46:31
fix tests running longer than necessary (26 failing)
Signed-off-by: derdilla <82763757+NobodyForNothing@users.noreply.github.com>
1 parent 06ca455
Changed files (2)
app/test/ui/components/measurement_list_entry_test.dart
@@ -85,5 +85,5 @@ void main() {
     expect(descTxt('2'), findsOneWidget);
     expect(descTxt('3'), findsOneWidget);
 
-  });
+  }, timeout: const Timeout(Duration(seconds: 10)),);
 }
app/test/ui/navigation_test.dart
@@ -20,15 +20,15 @@ import 'components/util.dart';
 void main() {
   group('start page', () {
     testWidgets('should navigate to add entry page', (tester) async {
-      await pumpAppRoot(tester);
+      await _pumpAppRoot(tester);
       expect(find.byIcon(Icons.add), findsOneWidget);
       await tester.tap(find.byIcon(Icons.add));
       await tester.pumpAndSettle();
 
       expect(find.byType(AddEntryDialoge), findsOneWidget);
-    });
+    }, timeout: const Timeout(Duration(seconds: 10)),);
     testWidgets('should navigate to settings page', (tester) async {
-      await pumpAppRoot(tester);
+      await _pumpAppRoot(tester);
       expect(find.byIcon(Icons.settings), findsOneWidget);
       await tester.tap(find.byIcon(Icons.settings));
       await tester.pumpAndSettle();
@@ -36,7 +36,7 @@ void main() {
       expect(find.byType(SettingsPage), findsOneWidget);
     });
     testWidgets('should navigate to stats page', (tester) async {
-      await pumpAppRoot(tester);
+      await _pumpAppRoot(tester);
       expect(find.byIcon(Icons.insights), findsOneWidget);
       await tester.tap(find.byIcon(Icons.insights));
       await tester.pumpAndSettle();
@@ -46,7 +46,7 @@ void main() {
   });
   group('settings page', () {
     testWidgets('open EnterTimeFormatScreen', (tester) async {
-      await pumpAppRoot(tester);
+      await _pumpAppRoot(tester);
       expect(find.byIcon(Icons.settings), findsOneWidget);
       await tester.tap(find.byIcon(Icons.settings));
       await tester.pumpAndSettle();
@@ -64,7 +64,7 @@ void main() {
 }
 
 /// Creates a the same App as the main method.
-Future<void> pumpAppRoot(WidgetTester tester, {
+Future<void> _pumpAppRoot(WidgetTester tester, {
   Settings? settings,
   ExportSettings? exportSettings,
   CsvExportSettings? csvExportSettings,