1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:07:25 +08:00

Fix intermitten screen navigation tests

This commit is contained in:
Dan Balasescu 2022-01-13 05:52:04 +09:00
parent 6b7896ec69
commit 672c1d36dc

View File

@ -251,8 +251,9 @@ namespace osu.Game.Tests.Visual.Navigation
[Test]
public void TestModSelectInput()
{
TestPlaySongSelect songSelect = null;
AddUntilStep("Wait for toolbar to load", () => Game.Toolbar.IsLoaded);
TestPlaySongSelect songSelect = null;
PushAndConfirm(() => songSelect = new TestPlaySongSelect());
AddStep("Show mods overlay", () => songSelect.ModSelectOverlay.Show());
@ -272,8 +273,9 @@ namespace osu.Game.Tests.Visual.Navigation
[Test]
public void TestBeatmapOptionsInput()
{
TestPlaySongSelect songSelect = null;
AddUntilStep("Wait for toolbar to load", () => Game.Toolbar.IsLoaded);
TestPlaySongSelect songSelect = null;
PushAndConfirm(() => songSelect = new TestPlaySongSelect());
AddStep("Show options overlay", () => songSelect.BeatmapOptionsOverlay.Show());
@ -293,6 +295,8 @@ namespace osu.Game.Tests.Visual.Navigation
[Test]
public void TestSettingsViaHotkeyFromMainMenu()
{
AddUntilStep("Wait for toolbar to load", () => Game.Toolbar.IsLoaded);
AddAssert("toolbar not displayed", () => Game.Toolbar.State.Value == Visibility.Hidden);
AddStep("press settings hotkey", () =>
@ -308,10 +312,11 @@ namespace osu.Game.Tests.Visual.Navigation
[Test]
public void TestToolbarHiddenByUser()
{
AddStep("Enter menu", () => InputManager.Key(Key.Enter));
AddUntilStep("Wait for toolbar to load", () => Game.Toolbar.IsLoaded);
AddStep("Enter menu", () => InputManager.Key(Key.Enter));
AddUntilStep("Toolbar is visible", () => Game.Toolbar.State.Value == Visibility.Visible);
AddStep("Hide toolbar", () =>
{
InputManager.PressKey(Key.ControlLeft);