diff --git a/catalyst_voices/integration_test/app_test.dart b/catalyst_voices/integration_test/app_test.dart index cfaa21bd8b1..a6bb948b19c 100644 --- a/catalyst_voices/integration_test/app_test.dart +++ b/catalyst_voices/integration_test/app_test.dart @@ -1,6 +1,6 @@ +import 'package:catalyst_voices/app/view/app.dart'; import 'package:catalyst_voices/configs/bootstrap.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:catalyst_voices/app/app.dart'; import 'package:integration_test/integration_test.dart'; void main() { @@ -10,9 +10,8 @@ void main() { testWidgets('tap on the floating action button, verify counter', (tester) async { final args = await bootstrapTest(); - // Load app widget. await tester.pumpWidget(App(routerConfig: args.routerConfig)); - await Future.delayed(Duration(seconds: 5)); + await tester.pumpAndSettle(Duration(seconds: 15)); }); }); } diff --git a/catalyst_voices/lib/configs/bootstrap.dart b/catalyst_voices/lib/configs/bootstrap.dart index afed37fca0e..d5a05c0580c 100644 --- a/catalyst_voices/lib/configs/bootstrap.dart +++ b/catalyst_voices/lib/configs/bootstrap.dart @@ -63,20 +63,6 @@ Future bootstrap([ } Future bootstrapTest() async { - // There's no need to call WidgetsFlutterBinding.ensureInitialized() - // since this is already done internally by SentryFlutter.init() - // More info here: https://github.com/getsentry/sentry-dart/issues/2063 - if (!kReleaseMode) { - WidgetsFlutterBinding.ensureInitialized(); - } - - FlutterError.onError = (details) { - log( - details.exceptionAsString(), - stackTrace: details.stack, - ); - }; - GoRouter.optionURLReflectsImperativeAPIs = true; setPathUrlStrategy(); @@ -90,9 +76,7 @@ Future bootstrapTest() async { await Dependencies.instance.init(); - final args = BootstrapArgs(routerConfig: router); - - return args; + return BootstrapArgs(routerConfig: router); } Future _runApp(Widget app) async {