mirror of https://github.com/flutter/pinball.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
873 B
32 lines
873 B
// ignore_for_file: cascade_invocations
|
|
|
|
import 'package:flame_forge2d/flame_forge2d.dart';
|
|
import 'package:flame_test/flame_test.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:pinball_components/pinball_components.dart';
|
|
import 'package:pinball_flame/pinball_flame.dart';
|
|
|
|
import '../../helpers/helpers.dart';
|
|
|
|
void main() {
|
|
group('Boundaries', () {
|
|
final tester = FlameTester(TestGame.new);
|
|
|
|
tester.testGameWidget(
|
|
'render correctly',
|
|
setUp: (game, tester) async {
|
|
await game.addFromBlueprint(Boundaries());
|
|
game.camera.followVector2(Vector2.zero());
|
|
game.camera.zoom = 3.9;
|
|
await game.ready();
|
|
},
|
|
verify: (game, tester) async {
|
|
await expectLater(
|
|
find.byGame<TestGame>(),
|
|
matchesGoldenFile('golden/boundaries.png'),
|
|
);
|
|
},
|
|
);
|
|
});
|
|
}
|