mirror of
https://github.com/ppy/osu.git
synced 2026-05-18 11:20:24 +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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user