1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 13:22:55 +08:00

Add basic toggle pause tests

This commit is contained in:
Joseph Madamba 2023-01-10 15:51:22 -08:00
parent 404d34f592
commit 974a8d520c

View File

@ -50,6 +50,22 @@ namespace osu.Game.Tests.Visual.Gameplay
confirmClockRunning(true);
}
[Test]
public void TestTogglePauseViaBackAction()
{
pauseViaBackAction();
pauseViaBackAction();
confirmPausedWithNoOverlay();
}
[Test]
public void TestTogglePauseViaPauseGameplayAction()
{
pauseViaPauseGameplayAction();
pauseViaPauseGameplayAction();
confirmPausedWithNoOverlay();
}
[Test]
public void TestPauseWithLargeOffset()
{
@ -382,6 +398,7 @@ namespace osu.Game.Tests.Visual.Gameplay
private void restart() => AddStep("restart", () => Player.Restart());
private void pauseViaBackAction() => AddStep("press escape", () => InputManager.Key(Key.Escape));
private void pauseViaPauseGameplayAction() => AddStep("press middle mouse", () => InputManager.Click(MouseButton.Middle));
private void exitViaQuickExitAction() => AddStep("press ctrl-tilde", () =>
{