@davoodmehraban89 / LifeMate / commits / 17fd63c
Fork 0

LifeMate — Personal, Family & Learning Companion

fix: place phase 4 widget test in test suite

davoodmehraban89 committed Oct 5, 2026 at 16:16 UTC 17fd63c854235878274d9353af96e2a96a0b7fdb
1 file changed +32 -30
apps/lifemate/test/app_test.dart
+32 -30
@@ -315,36 +315,6 @@ class FakeApi implements IdentityApi {
315 'rawNotesIncluded': false,
316 'rawConversationIncluded': false,
317 };
318 - testWidgets('phase 4 guide opens and returns advisory reply', (tester) async {
319 - await tester.pumpWidget(
320 - LifeMateApp(
321 - api: FakeApi(role: 'parent_guardian', themePreference: 'adult_blue'),
322 - ),
323 - );
324 - await tester.enterText(
325 - find.widgetWithText(TextField, 'ایمیل'),
326 - 'parent@example.test',
327 - );
328 - await tester.enterText(
329 - find.widgetWithText(TextField, 'رمز عبور'),
330 - 'StrongPass!123',
331 - );
332 - await tester.tap(find.text('ورود'));
333 - await tester.pumpAndSettle();
334 - await tester.tap(find.text('راهنما'));
335 - await tester.pumpAndSettle();
336 -
337 - expect(find.text('راهنمای هوشمند'), findsOneWidget);
338 - expect(find.text('همراه حال خوب'), findsOneWidget);
339 -
340 - await tester.tap(find.text('راهنمای مطالعه'));
341 - await tester.pumpAndSettle();
342 - await tester.enterText(find.byType(TextField).last, 'برای امتحان ریاضی چه کنم؟');
343 - await tester.tap(find.byIcon(Icons.send_rounded));
344 - await tester.pumpAndSettle();
345 -
346 - expect(find.text('پاسخ آزمایشی همراه هوشمند'), findsOneWidget);
347 - });
318 }
319
320 void main() {
@@ -428,4 +398,36 @@ void main() {
398 expect(find.text('من'), findsOneWidget);
399 expect(find.text('امتحان‌ها'), findsNothing);
400 });
401 +
402 + testWidgets('phase 4 guide opens and returns advisory reply', (tester) async {
403 + await tester.pumpWidget(
404 + LifeMateApp(
405 + api: FakeApi(role: 'parent_guardian', themePreference: 'adult_blue'),
406 + ),
407 + );
408 + await tester.enterText(
409 + find.widgetWithText(TextField, 'ایمیل'),
410 + 'parent@example.test',
411 + );
412 + await tester.enterText(
413 + find.widgetWithText(TextField, 'رمز عبور'),
414 + 'StrongPass!123',
415 + );
416 + await tester.tap(find.text('ورود'));
417 + await tester.pumpAndSettle();
418 + await tester.tap(find.text('راهنما'));
419 + await tester.pumpAndSettle();
420 +
421 + expect(find.text('راهنمای هوشمند'), findsOneWidget);
422 + expect(find.text('همراه حال خوب'), findsOneWidget);
423 +
424 + await tester.tap(find.text('راهنمای مطالعه'));
425 + await tester.pumpAndSettle();
426 + await tester.enterText(find.byType(TextField).last, 'برای امتحان ریاضی چه کنم؟');
427 + await tester.tap(find.byIcon(Icons.send_rounded));
428 + await tester.pumpAndSettle();
429 +
430 + expect(find.text('پاسخ آزمایشی همراه هوشمند'), findsOneWidget);
431 + });
432 +
433 }