mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 03:22:55 +08:00
Add test for pause via hold
This commit is contained in:
parent
40cf573368
commit
a4214db39e
@ -5,6 +5,7 @@ using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Graphics.Containers;
|
||||
@ -137,6 +138,22 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
exitAndConfirm();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestExitViaHoldToExit()
|
||||
{
|
||||
AddStep("exit", () =>
|
||||
{
|
||||
InputManager.MoveMouseTo(Player.HUDOverlay.HoldToQuit.First(c => c is HoldToConfirmContainer));
|
||||
InputManager.PressButton(MouseButton.Left);
|
||||
});
|
||||
|
||||
confirmPaused();
|
||||
|
||||
AddStep("release", () => InputManager.ReleaseButton(MouseButton.Left));
|
||||
|
||||
exitAndConfirm();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestExitFromPause()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user