Skip to content

Commit 713da9b

Browse files
committed
test: align local settings fixtures
1 parent 3085b71 commit 713da9b

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

‎test/presentation/my_page/my_page_screen_test.dart‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,10 @@ class _FakeAlarmRegistry implements AlarmRegistryRepository {
310310
}
311311

312312
class _FakeAlarmSchedulerService extends AlarmSchedulerService {
313-
AlarmSchedulerCapabilities capabilities =
314-
AlarmSchedulerCapabilities.unsupported;
313+
AlarmSchedulerCapabilities capabilities = const AlarmSchedulerCapabilities(
314+
supportsNativeAlarm: false,
315+
nativeAlarmProvider: AlarmProvider.none,
316+
);
315317
AlarmPermissionState permission = AlarmPermissionState.unsupported;
316318
int requestCount = 0;
317319

‎test/presentation/onboarding/screens/onboarding_screen_test.dart‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void main() {
8181
await tester.pumpAndSettle();
8282

8383
expect(
84-
find.text(
84+
find.textContaining(
8585
'Please select your usual preparation process.',
8686
findRichText: true,
8787
),
@@ -100,7 +100,7 @@ void main() {
100100
await tester.tap(find.widgetWithText(ElevatedButton, 'Next'));
101101
await tester.pumpAndSettle();
102102
expect(
103-
find.text(
103+
find.textContaining(
104104
'Please tell us the time required for each step.',
105105
findRichText: true,
106106
),
@@ -119,7 +119,7 @@ void main() {
119119
await tester.tap(find.widgetWithText(ElevatedButton, 'Next'));
120120
await tester.pumpAndSettle();
121121
expect(
122-
find.text('Set your spare time', findRichText: true),
122+
find.textContaining('Set your spare time', findRichText: true),
123123
findsOneWidget,
124124
);
125125

@@ -171,11 +171,14 @@ void main() {
171171
await tester.pumpAndSettle();
172172
}
173173
await tester.tap(find.widgetWithText(ElevatedButton, 'Next'));
174-
await tester.pumpAndSettle();
174+
await tester.pump();
175175

176176
expect(find.text('Error'), findsOneWidget);
177177
expect(useCase.submissions, hasLength(1));
178178
expect(find.byType(OnboardingScreen), findsOneWidget);
179+
180+
await tester.tap(find.text('OK'));
181+
await tester.pumpAndSettle();
179182
},
180183
);
181184
}

0 commit comments

Comments
 (0)