Merge pull request #14957 from peppy/fix-song-select-test-failure

Fix `TestDifficultyIconSelectingForDifferentRuleset` potentially failing due to async load
This commit is contained in:
Dan Balasescu 2021-10-06 10:10:57 +09:00 committed by GitHub
commit 4e13af6524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -714,10 +714,11 @@ namespace osu.Game.Tests.Visual.SongSelect
});
FilterableDifficultyIcon difficultyIcon = null;
AddStep("Find an icon for different ruleset", () =>
AddUntilStep("Find an icon for different ruleset", () =>
{
difficultyIcon = set.ChildrenOfType<FilterableDifficultyIcon>()
.First(icon => icon.Item.BeatmapInfo.Ruleset.ID == 3);
.FirstOrDefault(icon => icon.Item.BeatmapInfo.Ruleset.ID == 3);
return difficultyIcon != null;
});
AddAssert("Check ruleset is osu!", () => Ruleset.Value.ID == 0);