flutter_showcaseview icon indicating copy to clipboard operation
flutter_showcaseview copied to clipboard

Causes pumpAndSettle to hang in integration testing; Showcase won't settle down!

Open Steffanic opened this issue 2 years ago • 0 comments

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]

Steffanic avatar Mar 07 '22 15:03 Steffanic