1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 09:49:53 +08:00

Merge pull request #13840 from peppy/fix-run-from-screen-test-failures

Ensure run-from-screen song select reaches correct point in execution
This commit is contained in:
Bartłomiej Dach
2021-07-10 14:13:21 +02:00
committed by GitHub
Unverified
@@ -58,8 +58,7 @@ namespace osu.Game.Tests.Visual.Navigation
[Test]
public void TestPerformAtSongSelectFromPlayerLoader()
{
AddStep("import beatmap", () => ImportBeatmapTest.LoadQuickOszIntoOsu(Game).Wait());
PushAndConfirm(() => new TestPlaySongSelect());
importAndWaitForSongSelect();
AddStep("Press enter", () => InputManager.Key(Key.Enter));
AddUntilStep("Wait for new screen", () => Game.ScreenStack.CurrentScreen is PlayerLoader);
@@ -72,8 +71,7 @@ namespace osu.Game.Tests.Visual.Navigation
[Test]
public void TestPerformAtMenuFromPlayerLoader()
{
AddStep("import beatmap", () => ImportBeatmapTest.LoadQuickOszIntoOsu(Game).Wait());
PushAndConfirm(() => new TestPlaySongSelect());
importAndWaitForSongSelect();
AddStep("Press enter", () => InputManager.Key(Key.Enter));
AddUntilStep("Wait for new screen", () => Game.ScreenStack.CurrentScreen is PlayerLoader);
@@ -172,6 +170,13 @@ namespace osu.Game.Tests.Visual.Navigation
}
}
private void importAndWaitForSongSelect()
{
AddStep("import beatmap", () => ImportBeatmapTest.LoadQuickOszIntoOsu(Game).Wait());
PushAndConfirm(() => new TestPlaySongSelect());
AddUntilStep("beatmap updated", () => Game.Beatmap.Value.BeatmapSetInfo.OnlineBeatmapSetID == 241526);
}
public class DialogBlockingScreen : OsuScreen
{
[Resolved]