fix(test): corregge i fallimenti emersi alla prima esecuzione
- update_service_test: il fake HttpClientResponse tipizza lo stream come Stream<List<int>> (utf8.encode ritorna Uint8List) - guide/info_bottom_sheet test: i titoli delle _DocCard sono resi con toUpperCase(), i finder ora cercano il testo maiuscolo - converter_page_test e app_test: loadDb()/load() dei provider spostati nel setUp — chiamarli nel body di testWidgets (zona FakeAsync) bloccava la suite fino al timeout di 10 minuti Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,25 +12,26 @@ void main() {
|
||||
expect(find.text('Spesa'), findsOneWidget);
|
||||
});
|
||||
|
||||
// _DocCard rende i titoli con toUpperCase()
|
||||
testWidgets('la tab iniziale è Pasti', (tester) async {
|
||||
await tester.pumpApp(const GuidePage());
|
||||
expect(find.text('Aggiungere un alimento'), findsOneWidget);
|
||||
expect(find.text('AGGIUNGERE UN ALIMENTO'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('la tab Converti mostra i suoi contenuti', (tester) async {
|
||||
await tester.pumpApp(const GuidePage());
|
||||
await tester.tap(find.text('Converti'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Come usarlo'), findsOneWidget);
|
||||
expect(find.text('Alimenti disponibili'), findsOneWidget);
|
||||
expect(find.text('COME USARLO'), findsOneWidget);
|
||||
expect(find.text('ALIMENTI DISPONIBILI'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('la tab Spesa mostra i suoi contenuti', (tester) async {
|
||||
await tester.pumpApp(const GuidePage());
|
||||
await tester.tap(find.text('Spesa'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Aggiungere un elemento'), findsOneWidget);
|
||||
expect(find.text('Spuntare un elemento'), findsOneWidget);
|
||||
expect(find.text('AGGIUNGERE UN ELEMENTO'), findsOneWidget);
|
||||
expect(find.text('SPUNTARE UN ELEMENTO'), findsOneWidget);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user