From f826a525656a61a030830d178cd70f0f11eb7b87 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Fri, 28 Aug 2026 11:54:15 +0200 Subject: [PATCH] Fix test --- test/features/account/widgets/settings_test.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/features/account/widgets/settings_test.dart b/test/features/account/widgets/settings_test.dart index a76f2c36a..a860f37c0 100644 --- a/test/features/account/widgets/settings_test.dart +++ b/test/features/account/widgets/settings_test.dart @@ -51,6 +51,9 @@ void main() { setUp(() { when(mockSharedPreferences.getBool(any)).thenAnswer((_) async => null); when(mockSharedPreferences.getString(any)).thenAnswer((_) async => null); + when( + mockSharedPreferences.getAll(allowList: anyNamed('allowList')), + ).thenAnswer((_) async => {}); when( mockSharedPreferences.setBool(any, any), ).thenAnswer((_) async {}); @@ -103,7 +106,9 @@ void main() { }); testWidgets('dynamic color switch reflects a stored preference', (WidgetTester tester) async { - when(mockSharedPreferences.getBool(PREFS_USE_DYNAMIC_COLOR)).thenAnswer((_) async => true); + when( + mockSharedPreferences.getAll(allowList: anyNamed('allowList')), + ).thenAnswer((_) async => {PREFS_USE_DYNAMIC_COLOR: true}); await tester.pumpWidget(createSettingsScreen()); await tester.pumpAndSettle();