fix: clarify project registration controls

This commit is contained in:
Hamza Ayed
2026-10-04 03:28:30 +03:00
parent a91b35de1f
commit 40731f01d9
3 changed files with 49 additions and 9 deletions
@@ -169,7 +169,7 @@ void main() {
expect(find.text('مساعدك المحلي'), findsOneWidget);
expect(find.text('مشاريعي'), findsOneWidget);
expect(find.byTooltip('تسجيل مشروع جديد'), findsOneWidget);
expect(find.byTooltip('إضافة مشروع موجود إلى القائمة'), findsOneWidget);
expect(tester.takeException(), isNull);
await chatCubit.setDarkMode(true);
@@ -210,7 +210,39 @@ void main() {
await tester.pumpAndSettle();
expect(find.text('مشاريعي'), findsNothing);
expect(find.byTooltip('تسجيل مشروع من مجلد موجود'), findsOneWidget);
expect(find.byTooltip('إضافة مجلد مشروع موجود'), findsOneWidget);
expect(tester.takeException(), isNull);
await chatCubit.close();
});
testWidgets('wide desktop shows a labeled project registration action', (
tester,
) async {
tester.view.physicalSize = const Size(1500, 900);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.resetPhysicalSize);
addTearDown(tester.view.resetDevicePixelRatio);
final api = _TestApiRepository();
final chatCubit = ChatCubit(
api,
settingsStore: LocalSettingsStore.inMemory(),
);
await tester.pumpWidget(
MultiRepositoryProvider(
providers: [RepositoryProvider<ApiRepository>.value(value: api)],
child: MultiBlocProvider(
providers: [
BlocProvider.value(value: chatCubit),
BlocProvider(create: (_) => VoiceCubit(api, AudioRecorder())),
],
child: const SovereignApp(),
),
),
);
await tester.pumpAndSettle();
expect(find.text('إضافة مجلد مشروع'), findsOneWidget);
expect(tester.takeException(), isNull);
await chatCubit.close();
});