mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:42:54 +08:00
Ensure gameplay starts by dismissing any notifications in TestSceneChangeAndUseGameplayBindings
This commit is contained in:
parent
c0ed308016
commit
5085eb6801
@ -57,6 +57,13 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
|
||||
AddStep("enter gameplay", () => InputManager.Key(Key.Enter));
|
||||
|
||||
AddUntilStep("wait for player", () =>
|
||||
{
|
||||
// dismiss any notifications that may appear (ie. muted notification).
|
||||
clickMouseInCentre();
|
||||
return player != null;
|
||||
});
|
||||
|
||||
AddUntilStep("wait for gameplay", () => player?.IsBreakTime.Value == false);
|
||||
|
||||
AddStep("press 'z'", () => InputManager.Key(Key.Z));
|
||||
@ -66,6 +73,12 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
AddAssert("key counter did increase", () => keyCounter.CountPresses == 1);
|
||||
}
|
||||
|
||||
private void clickMouseInCentre()
|
||||
{
|
||||
InputManager.MoveMouseTo(Game.ScreenSpaceDrawQuad.Centre);
|
||||
InputManager.Click(MouseButton.Left);
|
||||
}
|
||||
|
||||
private KeyBindingsSubsection osuBindingSubsection => keyBindingPanel
|
||||
.ChildrenOfType<VariantBindingsSubsection>()
|
||||
.FirstOrDefault(s => s.Ruleset.ShortName == "osu");
|
||||
|
Loading…
Reference in New Issue
Block a user