@@ -171,7 +171,7 @@ class AuthNotifier extends StateNotifier<AuthState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final authRepositoryProvider = Provider<AuthRepository>((ref) {
|
final authRepositoryProvider = Provider<AuthRepository>((ref) {
|
||||||
final storage = laverieSecureStorage;
|
const storage = laverieSecureStorage;
|
||||||
|
|
||||||
// Token lu depuis le stockage sécurisé (évite la dépendance circulaire avec authProvider).
|
// Token lu depuis le stockage sécurisé (évite la dépendance circulaire avec authProvider).
|
||||||
return AuthRepository(
|
return AuthRepository(
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class MachineStatusLegend extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Wrap(
|
return const Wrap(
|
||||||
spacing: 12,
|
spacing: 12,
|
||||||
runSpacing: 6,
|
runSpacing: 6,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ class _EstablishmentCard extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Icon(Icons.grid_view_rounded, size: 14, color: AppColors.primary.withValues(alpha: 0.8)),
|
Icon(Icons.grid_view_rounded, size: 14, color: AppColors.primary.withValues(alpha: 0.8)),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
Text(
|
const Text(
|
||||||
'Voir les machines',
|
'Voir les machines',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: AppColors.primary,
|
color: AppColors.primary,
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class ActiveWashProgressCard extends StatelessWidget {
|
|||||||
Text(wash.machineName, style: Theme.of(context).textTheme.titleMedium),
|
Text(wash.machineName, style: Theme.of(context).textTheme.titleMedium),
|
||||||
Text(
|
Text(
|
||||||
p.phaseLabel,
|
p.phaseLabel,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
color: AppColors.machineRunning,
|
color: AppColors.machineRunning,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
|
|||||||
+7
-22
@@ -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/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.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() {
|
void main() {
|
||||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
testWidgets('SplashScreen affiche le titre de l\'application', (WidgetTester tester) async {
|
||||||
// Build our app and trigger a frame.
|
await tester.pumpWidget(
|
||||||
await tester.pumpWidget(const MyApp());
|
const MaterialApp(home: SplashScreen()),
|
||||||
|
);
|
||||||
|
|
||||||
// Verify that our counter starts at 0.
|
expect(find.text('Laverie Connectée'), findsOneWidget);
|
||||||
expect(find.text('0'), findsOneWidget);
|
expect(find.byType(CircularProgressIndicator), 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);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user