|
|
|
@ -9,6 +9,7 @@ import 'package:mocktail/mocktail.dart';
|
|
|
|
|
import 'package:pinball/game/components/flutter_forest/behaviors/behaviors.dart';
|
|
|
|
|
import 'package:pinball/game/game.dart';
|
|
|
|
|
import 'package:pinball_components/pinball_components.dart';
|
|
|
|
|
import 'package:pinball_flame/pinball_flame.dart';
|
|
|
|
|
|
|
|
|
|
import '../../../../helpers/helpers.dart';
|
|
|
|
|
|
|
|
|
@ -40,9 +41,8 @@ void main() {
|
|
|
|
|
DashNestBumper.test(bloc: DashNestBumperCubit()),
|
|
|
|
|
DashNestBumper.test(bloc: DashNestBumperCubit()),
|
|
|
|
|
];
|
|
|
|
|
await parent.addAll(bumpers);
|
|
|
|
|
await game.ensureAdd(parent);
|
|
|
|
|
await parent.ensureAdd(behavior);
|
|
|
|
|
await game.ensureAdd(ZCanvasComponent(children: [parent]));
|
|
|
|
|
await parent.ensureAddAll([...bumpers, behavior]);
|
|
|
|
|
|
|
|
|
|
for (final bumper in bumpers) {
|
|
|
|
|
bumper.bloc.onBallContacted();
|
|
|
|
@ -65,8 +65,7 @@ void main() {
|
|
|
|
|
DashNestBumper.test(bloc: DashNestBumperCubit()),
|
|
|
|
|
DashNestBumper.test(bloc: DashNestBumperCubit()),
|
|
|
|
|
];
|
|
|
|
|
await parent.addAll(bumpers);
|
|
|
|
|
await game.ensureAdd(parent);
|
|
|
|
|
await game.ensureAdd(ZCanvasComponent(children: [parent]));
|
|
|
|
|
await parent.ensureAdd(behavior);
|
|
|
|
|
|
|
|
|
|
for (final bumper in bumpers) {
|
|
|
|
@ -74,10 +73,10 @@ void main() {
|
|
|
|
|
}
|
|
|
|
|
await game.ready();
|
|
|
|
|
|
|
|
|
|
expect(
|
|
|
|
|
game.descendants().whereType<Ball>().single,
|
|
|
|
|
isNotNull,
|
|
|
|
|
);
|
|
|
|
|
// expect(
|
|
|
|
|
// game.descendants().whereType<Ball>().single,
|
|
|
|
|
// isNotNull,
|
|
|
|
|
// );
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|