|
|
@ -301,9 +301,11 @@ void main() {
|
|
|
|
expect(game.focusNode.hasFocus, isTrue);
|
|
|
|
expect(game.focusNode.hasFocus, isTrue);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
testWidgets('mobile controls when the overlay is added', (tester) async {
|
|
|
|
testWidgets(
|
|
|
|
|
|
|
|
'mobile controls when the overlay is added',
|
|
|
|
|
|
|
|
(tester) async {
|
|
|
|
await tester.pumpApp(
|
|
|
|
await tester.pumpApp(
|
|
|
|
PinballGameView(game),
|
|
|
|
Material(child: PinballGameView(game)),
|
|
|
|
gameBloc: gameBloc,
|
|
|
|
gameBloc: gameBloc,
|
|
|
|
startGameBloc: startGameBloc,
|
|
|
|
startGameBloc: startGameBloc,
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -312,14 +314,18 @@ void main() {
|
|
|
|
|
|
|
|
|
|
|
|
await tester.pump();
|
|
|
|
await tester.pump();
|
|
|
|
|
|
|
|
|
|
|
|
expect(find.byType(MobileControls), findsOneWidget);
|
|
|
|
expect(
|
|
|
|
});
|
|
|
|
game.overlays.isActive(PinballGame.mobileControlsOverlay),
|
|
|
|
|
|
|
|
isTrue,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
testWidgets(
|
|
|
|
testWidgets(
|
|
|
|
'ReplayButtonOverlay when the overlay is added',
|
|
|
|
'ReplayButtonOverlay when the overlay is added',
|
|
|
|
(tester) async {
|
|
|
|
(tester) async {
|
|
|
|
await tester.pumpApp(
|
|
|
|
await tester.pumpApp(
|
|
|
|
PinballGameView(game),
|
|
|
|
Material(child: PinballGameView(game)),
|
|
|
|
gameBloc: gameBloc,
|
|
|
|
gameBloc: gameBloc,
|
|
|
|
startGameBloc: startGameBloc,
|
|
|
|
startGameBloc: startGameBloc,
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -328,7 +334,10 @@ void main() {
|
|
|
|
|
|
|
|
|
|
|
|
await tester.pump();
|
|
|
|
await tester.pump();
|
|
|
|
|
|
|
|
|
|
|
|
expect(find.byType(ReplayButtonOverlay), findsOneWidget);
|
|
|
|
expect(
|
|
|
|
|
|
|
|
game.overlays.isActive(PinballGame.replayButtonOverlay),
|
|
|
|
|
|
|
|
isTrue,
|
|
|
|
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|