1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 14:12:56 +08:00

Merge pull request #16436 from smoogipoo/fix-intermittent-tests

This commit is contained in:
Dean Herbert 2022-01-13 09:45:22 +09:00 committed by GitHub
commit 24f02cab8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);