mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Fix song select tests potentially failing due to difficulty panels not yet displayed
This commit is contained in:
@ -110,7 +110,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
|
||||
createSongSelect();
|
||||
|
||||
AddUntilStep("wait for initial selection", () => !Beatmap.IsDefault);
|
||||
waitForInitialSelection();
|
||||
|
||||
WorkingBeatmap selected = null;
|
||||
|
||||
@ -135,7 +135,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
|
||||
createSongSelect();
|
||||
|
||||
AddUntilStep("wait for initial selection", () => !Beatmap.IsDefault);
|
||||
waitForInitialSelection();
|
||||
|
||||
WorkingBeatmap selected = null;
|
||||
|
||||
@ -189,7 +189,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
|
||||
createSongSelect();
|
||||
|
||||
AddUntilStep("wait for initial selection", () => !Beatmap.IsDefault);
|
||||
waitForInitialSelection();
|
||||
|
||||
WorkingBeatmap selected = null;
|
||||
|
||||
@ -769,6 +769,12 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
AddAssert("Check first item in group selected", () => Beatmap.Value.BeatmapInfo == groupIcon.Items.First().Beatmap);
|
||||
}
|
||||
|
||||
private void waitForInitialSelection()
|
||||
{
|
||||
AddUntilStep("wait for initial selection", () => !Beatmap.IsDefault);
|
||||
AddUntilStep("wait for difficulty panels visible", () => songSelect.Carousel.ChildrenOfType<DrawableCarouselBeatmap>().Any());
|
||||
}
|
||||
|
||||
private int getBeatmapIndex(BeatmapSetInfo set, BeatmapInfo info) => set.Beatmaps.FindIndex(b => b == info);
|
||||
|
||||
private int getCurrentBeatmapIndex() => getBeatmapIndex(songSelect.Carousel.SelectedBeatmapSet, songSelect.Carousel.SelectedBeatmap);
|
||||
|
Reference in New Issue
Block a user