Replace tester.pumpAndSettle(); with tester.pump();

Replacing `tester.pumpAndSettle();` with `tester.pump();` resolves an issue where `pumpAndSettle()` waits for all animations to complete, causing an infinite loop with `CircularProgressIndicator`. Using `pump()` ensures efficient frame building without unnecessary animation waiting.
This commit is contained in:
Yousef Rabia
2024-03-01 17:18:42 +02:00
parent dc25c6a70e
commit e14446f2e3

View File

@ -13,7 +13,7 @@ void main() {
),
);
await tester.pumpAndSettle();
await tester.pump();
expect(find.text('Welcome to API Dash ⚡️'), findsOneWidget);
expect(find.byType(RichText), findsAtLeastNWidgets(1));