From c2214a04d81f1181486af3d68d87775fb6fac285 Mon Sep 17 00:00:00 2001 From: alestiago Date: Fri, 1 Apr 2022 09:27:47 +0100 Subject: [PATCH] fix: fixed test --- test/game/components/flutter_forest_test.dart | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/game/components/flutter_forest_test.dart b/test/game/components/flutter_forest_test.dart index 31bde1e4..a0e1b81f 100644 --- a/test/game/components/flutter_forest_test.dart +++ b/test/game/components/flutter_forest_test.dart @@ -153,8 +153,9 @@ void main() { tester.testGameWidget( 'add DashNestActivated event', setUp: (game, tester) async { - final flutterForest = FlutterForest(); - await game.ensureAdd(flutterForest); + await game.ready(); + final flutterForest = + game.descendants().whereType().first; await game.ensureAdd(ball); final bumpers = @@ -163,11 +164,9 @@ void main() { for (final bumper in bumpers) { beginContact(game, bumper, ball); final controller = bumper.firstChild()!; - // TODO(alestiago): Investiagate why is is being called twice - // instead of once. verify( () => gameBloc.add(DashNestActivated(controller.id)), - ).called(2); + ).called(1); } }, );