mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 18:13:09 +08:00
Ensure run-from-screen song select reaches correct point in execution
Fixes issues as seen at https://github.com/ppy/osu/runs/3023581865?check_suite_focus=true. Song select may take a few frames to perform initial selection as there is a bit of internal async logic. This ensures that the beatmap has been updated before continuing with test execution.
This commit is contained in:
parent
dbfeea9880
commit
9786e1a932
@ -58,8 +58,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestPerformAtSongSelectFromPlayerLoader()
|
public void TestPerformAtSongSelectFromPlayerLoader()
|
||||||
{
|
{
|
||||||
AddStep("import beatmap", () => ImportBeatmapTest.LoadQuickOszIntoOsu(Game).Wait());
|
importAndWaitForSongSelect();
|
||||||
PushAndConfirm(() => new TestPlaySongSelect());
|
|
||||||
|
|
||||||
AddStep("Press enter", () => InputManager.Key(Key.Enter));
|
AddStep("Press enter", () => InputManager.Key(Key.Enter));
|
||||||
AddUntilStep("Wait for new screen", () => Game.ScreenStack.CurrentScreen is PlayerLoader);
|
AddUntilStep("Wait for new screen", () => Game.ScreenStack.CurrentScreen is PlayerLoader);
|
||||||
@ -72,8 +71,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestPerformAtMenuFromPlayerLoader()
|
public void TestPerformAtMenuFromPlayerLoader()
|
||||||
{
|
{
|
||||||
AddStep("import beatmap", () => ImportBeatmapTest.LoadQuickOszIntoOsu(Game).Wait());
|
importAndWaitForSongSelect();
|
||||||
PushAndConfirm(() => new TestPlaySongSelect());
|
|
||||||
|
|
||||||
AddStep("Press enter", () => InputManager.Key(Key.Enter));
|
AddStep("Press enter", () => InputManager.Key(Key.Enter));
|
||||||
AddUntilStep("Wait for new screen", () => Game.ScreenStack.CurrentScreen is PlayerLoader);
|
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
|
public class DialogBlockingScreen : OsuScreen
|
||||||
{
|
{
|
||||||
[Resolved]
|
[Resolved]
|
||||||
|
Loading…
Reference in New Issue
Block a user