Attempt to fix flaky `PlaylistOverlay` test

This commit is contained in:
Dean Herbert 2022-06-27 02:58:01 +09:00
parent f15698d025
commit cd9eaf215b
1 changed files with 10 additions and 1 deletions

View File

@ -27,6 +27,8 @@ public class TestScenePlaylistOverlay : OsuManualInputManagerTestScene
private Live<BeatmapSetInfo> first;
private const int item_count = 100;
[SetUp]
public void Setup() => Schedule(() =>
{
@ -46,7 +48,7 @@ public void Setup() => Schedule(() =>
beatmapSets.Clear();
for (int i = 0; i < 100; i++)
for (int i = 0; i < item_count; i++)
{
beatmapSets.Add(TestResources.CreateTestBeatmapSetInfo().ToLiveUnmanaged());
}
@ -59,6 +61,13 @@ public void Setup() => Schedule(() =>
[Test]
public void TestRearrangeItems()
{
AddUntilStep("wait for load complete", () =>
{
return this
.ChildrenOfType<PlaylistItem>()
.Count(i => i.ChildrenOfType<DelayedLoadWrapper>().First().DelayedLoadCompleted) > 6;
});
AddUntilStep("wait for animations to complete", () => !playlistOverlay.Transforms.Any());
AddStep("hold 1st item handle", () =>