Commit e3844a0

derdilla <82763757+NobodyForNothing@users.noreply.github.com>
2023-11-12 13:47:51
test allowManualTimeInput
Signed-off-by: derdilla <82763757+NobodyForNothing@users.noreply.github.com>
1 parent d751b6b
Changed files (1)
test/ui/components/add_measurement_dialoge_test.dart
@@ -196,6 +196,18 @@ void main() {
       await widgetTester.pumpAndSettle();
       expect(find.byType(AddMeasurementDialoge), findsNothing);
     });
+    testWidgets('should respect settings.allowManualTimeInput', (widgetTester) async {
+      await widgetTester.pumpWidget(_materialApp(
+          Builder(
+            builder: (BuildContext context) => TextButton(onPressed: () async {
+              await showAddMeasurementDialoge(context, Settings(validateInputs: false, allowMissingValues: true));
+            }, child: const Text('TEST')),
+          )));
+      await widgetTester.tap(find.text('TEST'));
+      await widgetTester.pumpAndSettle();
+
+      expect(find.byIcon(Icons.edit), findsNothing);
+    });
   });
 }