mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 16:52:54 +08:00
Add basic toggle pause tests
This commit is contained in:
parent
404d34f592
commit
974a8d520c
@ -50,6 +50,22 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
confirmClockRunning(true);
|
confirmClockRunning(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestTogglePauseViaBackAction()
|
||||||
|
{
|
||||||
|
pauseViaBackAction();
|
||||||
|
pauseViaBackAction();
|
||||||
|
confirmPausedWithNoOverlay();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestTogglePauseViaPauseGameplayAction()
|
||||||
|
{
|
||||||
|
pauseViaPauseGameplayAction();
|
||||||
|
pauseViaPauseGameplayAction();
|
||||||
|
confirmPausedWithNoOverlay();
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestPauseWithLargeOffset()
|
public void TestPauseWithLargeOffset()
|
||||||
{
|
{
|
||||||
@ -382,6 +398,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
|
|
||||||
private void restart() => AddStep("restart", () => Player.Restart());
|
private void restart() => AddStep("restart", () => Player.Restart());
|
||||||
private void pauseViaBackAction() => AddStep("press escape", () => InputManager.Key(Key.Escape));
|
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", () =>
|
private void exitViaQuickExitAction() => AddStep("press ctrl-tilde", () =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user