Refactor ProfileContent to use ErrorService for error handling and update instantiation in SettingsContent
This commit is contained in:
@@ -9,13 +9,11 @@ void main() {
|
||||
print('=== Scénario 1: Premier chargement ===');
|
||||
String? existingImage; // Aucune image dans le Storage
|
||||
|
||||
if (existingImage == null) {
|
||||
print('✓ Aucune image existante trouvée');
|
||||
print('✓ Téléchargement d\'une nouvelle image depuis Google Places');
|
||||
existingImage = 'https://storage.googleapis.com/image1.jpg';
|
||||
print('✓ Image sauvée: $existingImage');
|
||||
}
|
||||
|
||||
print('✓ Aucune image existante trouvée');
|
||||
print('✓ Téléchargement d\'une nouvelle image depuis Google Places');
|
||||
existingImage = 'https://storage.googleapis.com/image1.jpg';
|
||||
print('✓ Image sauvée: $existingImage');
|
||||
|
||||
expect(existingImage, isNotNull);
|
||||
|
||||
// Scénario 2: Rechargement (image existante)
|
||||
@@ -33,12 +31,10 @@ void main() {
|
||||
String?
|
||||
differentLocationImage; // Pas d'image pour cette nouvelle destination
|
||||
|
||||
if (differentLocationImage == null) {
|
||||
print('✓ Nouvelle destination, aucune image existante');
|
||||
print('✓ Téléchargement autorisé pour cette nouvelle destination');
|
||||
differentLocationImage = 'https://storage.googleapis.com/image2.jpg';
|
||||
}
|
||||
|
||||
print('✓ Nouvelle destination, aucune image existante');
|
||||
print('✓ Téléchargement autorisé pour cette nouvelle destination');
|
||||
differentLocationImage = 'https://storage.googleapis.com/image2.jpg';
|
||||
|
||||
expect(differentLocationImage, isNotNull);
|
||||
expect(differentLocationImage, isNot(equals(existingImage)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user