@@ -14,30 +14,29 @@ void main() {
14
14
app.main (env: "dev" );
15
15
await tester.pumpAndSettle (Duration (seconds: 3 ));
16
16
17
- // Expect notification permission being asked
18
- /*final notificationPermissionDialog = find.text('to send you notifications');
19
- expect(notificationPermissionDialog, findsOneWidget);
20
- final allowButton = find.text('Allow');
21
- await tester.tap(allowButton);
22
- await tester.pumpAndSettle();*/
23
-
24
17
// New user is created: Show consent form
25
18
final acceptConditionsCheckbox =
26
19
find.byKey (ValueKey ("acceptConditionsCheckbox" ));
20
+ await tester.ensureVisible (acceptConditionsCheckbox);
27
21
await tester.tap (acceptConditionsCheckbox);
22
+
28
23
final acceptPrivacyPolicy = find.byKey (ValueKey ("acceptPrivacyPolicy" ));
24
+ await tester.ensureVisible (acceptPrivacyPolicy);
29
25
await tester.tap (acceptPrivacyPolicy);
26
+
30
27
await tester.pumpAndSettle ();
28
+
31
29
final continueButton = find.byKey (ValueKey (
32
30
"button" )); // TODO: Using Style.button prevents adding a Key to only this element
33
31
await tester.tap (continueButton);
34
32
await tester.pumpAndSettle ();
35
33
34
+ // TODO: Mock needed to set the location as always allowed?
36
35
// Home page
37
- // final homePageButtons = find.byType(CustomCard);
38
- // expect(homePageButtons, findsNWidgets(4));
39
- // await tester.tap(homePageButtons.at(0));
40
- // await tester.pumpAndSettle();
36
+ final homePageButtons = find.byType (CustomCard );
37
+ expect (homePageButtons, findsNWidgets (4 ));
38
+ await tester.tap (homePageButtons.at (0 ));
39
+ await tester.pumpAndSettle ();
41
40
42
41
expect (true , true );
43
42
});
0 commit comments