mirror of
https://github.com/ppy/osu.git
synced 2024-12-18 16:34:05 +08:00
Merge branch 'master' into android
This commit is contained in:
commit
a2cba24f73
@ -214,37 +214,6 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
AddAssert("start not requested", () => !startRequested);
|
AddAssert("start not requested", () => !startRequested);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void TestAddNewBeatmapWhileSelectingRandom()
|
|
||||||
{
|
|
||||||
const int test_count = 10;
|
|
||||||
int beatmapChangedCount = 0;
|
|
||||||
int debounceCount = 0;
|
|
||||||
createSongSelect();
|
|
||||||
AddStep("Setup counters", () =>
|
|
||||||
{
|
|
||||||
beatmapChangedCount = 0;
|
|
||||||
debounceCount = 0;
|
|
||||||
songSelect.Carousel.SelectionChanged += _ => beatmapChangedCount++;
|
|
||||||
});
|
|
||||||
AddRepeatStep($"Create beatmaps {test_count} times", () =>
|
|
||||||
{
|
|
||||||
importForRuleset(0);
|
|
||||||
|
|
||||||
Scheduler.AddDelayed(() =>
|
|
||||||
{
|
|
||||||
// Wait for debounce
|
|
||||||
songSelect.Carousel.SelectNextRandom();
|
|
||||||
++debounceCount;
|
|
||||||
}, 400);
|
|
||||||
}, test_count);
|
|
||||||
|
|
||||||
AddUntilStep("Debounce limit reached", () => debounceCount == test_count);
|
|
||||||
|
|
||||||
// The selected beatmap should have changed an additional 2 times since both initially loading songselect and the first import also triggers selectionChanged
|
|
||||||
AddAssert($"Beatmap changed {test_count + 2} times", () => beatmapChangedCount == test_count + 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestHideSetSelectsCorrectBeatmap()
|
public void TestHideSetSelectsCorrectBeatmap()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user