diff --git a/test/game/components/android_acres/behaviors/android_spaceship_bonus_behavior_test.dart b/test/game/components/android_acres/behaviors/android_spaceship_bonus_behavior_test.dart index 4ecdb05b..e6b03c5f 100644 --- a/test/game/components/android_acres/behaviors/android_spaceship_bonus_behavior_test.dart +++ b/test/game/components/android_acres/behaviors/android_spaceship_bonus_behavior_test.dart @@ -42,6 +42,9 @@ class _TestGame extends Forge2DGame { AndroidAcres child, { required GameBloc gameBloc, }) async { + // Not needed once https://github.com/flame-engine/flame/issues/1607 + // is fixed + await onLoad(); await ensureAdd( FlameBlocProvider.value( value: gameBloc, diff --git a/test/game/components/multiballs/multiballs_test.dart b/test/game/components/multiballs/multiballs_test.dart index 1841d0a3..da736c27 100644 --- a/test/game/components/multiballs/multiballs_test.dart +++ b/test/game/components/multiballs/multiballs_test.dart @@ -17,8 +17,11 @@ class _TestGame extends Forge2DGame { ]); } - Future pump(Multiballs child, {GameBloc? gameBloc}) { - return ensureAdd( + Future pump(Multiballs child, {GameBloc? gameBloc}) async { + // Not needed once https://github.com/flame-engine/flame/issues/1607 + // is fixed + await onLoad(); + await ensureAdd( FlameBlocProvider.value( value: gameBloc ?? GameBloc(), children: [child], @@ -38,7 +41,9 @@ void main() { setUp: (game, tester) async { final multiballs = Multiballs(); await game.pump(multiballs); - expect(game.descendants(), contains(multiballs)); + }, + verify: (game, tester) async { + expect(game.descendants().whereType().length, equals(1)); }, );