1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 08:52:55 +08:00

Assign random statuses to beatmap sets in carousel test

Just to have visual coverage of the statuses before fixing them not
propagating to split difficulty mode.
This commit is contained in:
Bartłomiej Dach 2023-09-06 08:18:39 +02:00
parent 4dafd4c4a2
commit b884f1af4a
No known key found for this signature in database

View File

@ -515,6 +515,7 @@ namespace osu.Game.Tests.Visual.SongSelect
checkVisibleItemCount(false, local_set_count * local_diff_count);
var firstAdded = TestResources.CreateTestBeatmapSetInfo(local_diff_count);
firstAdded.Status = BeatmapOnlineStatus.Loved;
AddStep("Add new set", () => carousel.UpdateBeatmapSet(firstAdded));
@ -1176,12 +1177,18 @@ namespace osu.Game.Tests.Visual.SongSelect
if (beatmapSets == null)
{
beatmapSets = new List<BeatmapSetInfo>();
var statuses = Enum.GetValues<BeatmapOnlineStatus>()
.Except(new[] { BeatmapOnlineStatus.None }) // make sure a badge is always shown.
.ToArray();
for (int i = 1; i <= (setCount ?? set_count); i++)
{
beatmapSets.Add(randomDifficulties
var set = randomDifficulties
? TestResources.CreateTestBeatmapSetInfo()
: TestResources.CreateTestBeatmapSetInfo(diffCount ?? diff_count));
: TestResources.CreateTestBeatmapSetInfo(diffCount ?? diff_count);
set.Status = statuses[RNG.Next(statuses.Length)];
beatmapSets.Add(set);
}
}