@davoodmehraban89 / LifeMate / commits / 9442dd0
Fork 0

LifeMate — Personal, Family & Learning Companion

test: initialize offline preferences in widget tests

davoodmehraban89 committed Oct 5, 2026 at 15:15 UTC 9442dd0f342e58fd89ee93abd21b19b5b4ffa595
1 file changed +5
apps/lifemate/test/app_test.dart
+5
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
2 import 'package:flutter_test/flutter_test.dart';
3 import 'package:lifemate/api.dart';
4 import 'package:lifemate/main.dart';
5 +import 'package:shared_preferences/shared_preferences.dart';
6
7 class FakeApi implements IdentityApi {
8 FakeApi({
@@ -224,6 +225,10 @@ class FakeApi implements IdentityApi {
225 }
226
227 void main() {
228 + setUp(() {
229 + SharedPreferences.setMockInitialValues({});
230 + });
231 +
232 testWidgets('starts in Persian RTL with identity actions', (tester) async {
233 await tester.pumpWidget(LifeMateApp(api: FakeApi()));
234