diff --git a/lib/core/auth/auth_provider.dart b/lib/core/auth/auth_provider.dart index 4d3546a..263c654 100644 --- a/lib/core/auth/auth_provider.dart +++ b/lib/core/auth/auth_provider.dart @@ -171,7 +171,7 @@ class AuthNotifier extends StateNotifier { } final authRepositoryProvider = Provider((ref) { - final storage = laverieSecureStorage; + const storage = laverieSecureStorage; // Token lu depuis le stockage sécurisé (évite la dépendance circulaire avec authProvider). return AuthRepository( diff --git a/lib/core/widgets/machine_widgets.dart b/lib/core/widgets/machine_widgets.dart index 2a73fd8..dee9a42 100644 --- a/lib/core/widgets/machine_widgets.dart +++ b/lib/core/widgets/machine_widgets.dart @@ -12,7 +12,7 @@ class MachineStatusLegend extends StatelessWidget { @override Widget build(BuildContext context) { - return Wrap( + return const Wrap( spacing: 12, runSpacing: 6, children: [ diff --git a/lib/features/home/presentation/home_screen.dart b/lib/features/home/presentation/home_screen.dart index e2aec53..b5ecb8d 100644 --- a/lib/features/home/presentation/home_screen.dart +++ b/lib/features/home/presentation/home_screen.dart @@ -155,7 +155,7 @@ class _EstablishmentCard extends StatelessWidget { children: [ Icon(Icons.grid_view_rounded, size: 14, color: AppColors.primary.withValues(alpha: 0.8)), const SizedBox(width: 4), - Text( + const Text( 'Voir les machines', style: TextStyle( color: AppColors.primary, diff --git a/lib/features/wash/presentation/widgets/active_wash_progress_card.dart b/lib/features/wash/presentation/widgets/active_wash_progress_card.dart index df5dd34..c39373a 100644 --- a/lib/features/wash/presentation/widgets/active_wash_progress_card.dart +++ b/lib/features/wash/presentation/widgets/active_wash_progress_card.dart @@ -51,7 +51,7 @@ class ActiveWashProgressCard extends StatelessWidget { Text(wash.machineName, style: Theme.of(context).textTheme.titleMedium), Text( p.phaseLabel, - style: TextStyle( + style: const TextStyle( color: AppColors.machineRunning, fontWeight: FontWeight.w600, fontSize: 13, diff --git a/test/widget_test.dart b/test/widget_test.dart index f9495fe..9421e23 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -1,30 +1,15 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility in the flutter_test package. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:laverie_mobile/main.dart'; +import 'package:laverie_mobile/features/auth/presentation/splash_screen.dart'; void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); + testWidgets('SplashScreen affiche le titre de l\'application', (WidgetTester tester) async { + await tester.pumpWidget( + const MaterialApp(home: SplashScreen()), + ); - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); + expect(find.text('Laverie Connectée'), findsOneWidget); + expect(find.byType(CircularProgressIndicator), findsOneWidget); }); }