|
|
@ -34,6 +34,19 @@ void main() {
|
|
|
|
expect(game.descendants(), contains(behavior));
|
|
|
|
expect(game.descendants(), contains(behavior));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
flameTester.test('resizes and snaps', (game) async {
|
|
|
|
|
|
|
|
final behavior = CameraFocusingBehavior();
|
|
|
|
|
|
|
|
await game.ensureAdd(
|
|
|
|
|
|
|
|
FlameBlocProvider<GameBloc, GameState>.value(
|
|
|
|
|
|
|
|
value: GameBloc(),
|
|
|
|
|
|
|
|
children: [behavior],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
behavior.onGameResize(Vector2.all(10));
|
|
|
|
|
|
|
|
expect(game.camera.zoom, greaterThan(0));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
flameTester.test(
|
|
|
|
flameTester.test(
|
|
|
|
'changes focus when loaded',
|
|
|
|
'changes focus when loaded',
|
|
|
|
(game) async {
|
|
|
|
(game) async {
|
|
|
|