1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:02:55 +08:00

Add test for pause via hold

This commit is contained in:
Dean Herbert 2019-06-25 23:48:42 +09:00
parent 40cf573368
commit a4214db39e

View File

@ -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()
{