flutter_showcaseview
flutter_showcaseview copied to clipboard
Causes pumpAndSettle to hang in integration testing; Showcase won't settle down!
Describe the bug When using a Showcase, the floating box that slowly moves up and down is a continuous animation. During a pumpAndSettle in integration testing, flutter continues to pump until all animations are finished. If the Showcase is open during a pumpAndSettle the integration test will quietly hang until the pumpAndSettle times out.
To Reproduce In the build method of your main app class:
@override
Widget build(BuildContext context) {
WidgetsBinding.instance!.addPostFrameCallback((_) {
ShowCaseWidget.of(context)!.startShowCase(
[_widgetKey1, _widgetKey2, ...]);
});
return AwesomeWidget(...)
}
Then in your integration test:
main(...) {
group(...){
testWidget(...){
app.main()
tester.pumpAndSettle() //hangs until timeout
}
}
}
Expected behavior I think that this is the expected behaviour, it just feels like a gotcha and it took me some time to determine the source of the issue.
Desktop (please complete the following information):
- OS: Windows
- Browser chromedriver
- Version [99.0.4844.51]