mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:25:05 +08:00
Add failing rapid back button exit test
This commit is contained in:
parent
569b73cf69
commit
bc839be4d8
@ -11,6 +11,7 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.Leaderboards;
|
||||
using osu.Game.Overlays;
|
||||
@ -503,6 +504,22 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
AddStep("test dispose doesn't crash", () => Game.Dispose());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRapidBackButtonExit()
|
||||
{
|
||||
AddStep("set hold delay to 0", () => Game.LocalConfig.SetValue(OsuSetting.UIHoldActivationDelay, 0.0));
|
||||
|
||||
AddStep("press escape twice rapidly", () =>
|
||||
{
|
||||
InputManager.Key(Key.Escape);
|
||||
InputManager.Key(Key.Escape);
|
||||
});
|
||||
|
||||
pushEscape();
|
||||
|
||||
AddAssert("exit dialog is shown", () => Game.Dependencies.Get<IDialogOverlay>().CurrentDialog != null);
|
||||
}
|
||||
|
||||
private Func<Player> playToResults()
|
||||
{
|
||||
Player player = null;
|
||||
|
Loading…
Reference in New Issue
Block a user