|
|
@ -302,7 +302,6 @@ void main() {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
testWidgets('mobile controls when the overlay is added', (tester) async {
|
|
|
|
testWidgets('mobile controls when the overlay is added', (tester) async {
|
|
|
|
const targetOverlay = PinballGame.mobileControlsOverlay;
|
|
|
|
|
|
|
|
await tester.pumpApp(
|
|
|
|
await tester.pumpApp(
|
|
|
|
PinballGameView(game),
|
|
|
|
PinballGameView(game),
|
|
|
|
gameBloc: gameBloc,
|
|
|
|
gameBloc: gameBloc,
|
|
|
@ -311,7 +310,7 @@ void main() {
|
|
|
|
|
|
|
|
|
|
|
|
game.overlays.clear();
|
|
|
|
game.overlays.clear();
|
|
|
|
await tester.pump();
|
|
|
|
await tester.pump();
|
|
|
|
game.overlays.add(targetOverlay);
|
|
|
|
game.overlays.add(PinballGame.mobileControlsOverlay);
|
|
|
|
await tester.pump();
|
|
|
|
await tester.pump();
|
|
|
|
|
|
|
|
|
|
|
|
expect(find.byType(MobileControls), findsOneWidget);
|
|
|
|
expect(find.byType(MobileControls), findsOneWidget);
|
|
|
@ -320,7 +319,6 @@ void main() {
|
|
|
|
testWidgets(
|
|
|
|
testWidgets(
|
|
|
|
'ReplayButtonOverlay when the overlay is added',
|
|
|
|
'ReplayButtonOverlay when the overlay is added',
|
|
|
|
(tester) async {
|
|
|
|
(tester) async {
|
|
|
|
const targetOverlay = PinballGame.replayButtonOverlay;
|
|
|
|
|
|
|
|
await tester.pumpApp(
|
|
|
|
await tester.pumpApp(
|
|
|
|
PinballGameView(game),
|
|
|
|
PinballGameView(game),
|
|
|
|
gameBloc: gameBloc,
|
|
|
|
gameBloc: gameBloc,
|
|
|
@ -329,7 +327,7 @@ void main() {
|
|
|
|
|
|
|
|
|
|
|
|
game.overlays.clear();
|
|
|
|
game.overlays.clear();
|
|
|
|
await tester.pump();
|
|
|
|
await tester.pump();
|
|
|
|
game.overlays.add(targetOverlay);
|
|
|
|
game.overlays.add(PinballGame.replayButtonOverlay);
|
|
|
|
await tester.pump();
|
|
|
|
await tester.pump();
|
|
|
|
|
|
|
|
|
|
|
|
expect(find.byType(ReplayButtonOverlay), findsOneWidget);
|
|
|
|
expect(find.byType(ReplayButtonOverlay), findsOneWidget);
|
|
|
|