flutter_gherkin
flutter_gherkin copied to clipboard
Test finishing timeout if the last screen of the app contains animation
I have a test where the last screen is a ListView with a loading indicator at the bottom (pagination). In this situation, the pumpAndSettle will result in infinite loop failing the test to finish.
https://github.com/jonsamwell/flutter_gherkin/blob/eff82509c71c457714d2fbc2a54334d33b397c03/lib/src/flutter/runners/gherkin_integration_test_runner.dart#L532-L541
Here is my current workaround:
executeTestSuite(
appMainFunction: appInitializationFn,
configuration: gherkinTestConfiguration(reporter),
// Fixes: https://github.com/jonsamwell/flutter_gherkin/issues/259
appLifecyclePumpHandler: (phase, tester) =>
tester.pump(const Duration(seconds: 5)),
);
@SashaKryzh that is the correct idea. The tester pumps after steps so if an animation is running endlessly the pump call with never finish