1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 13:45:59 +08:00

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

View File

@ -27,6 +27,8 @@ namespace osu.Game.Tests.Visual.UserInterface
private Live<BeatmapSetInfo> first;
private const int item_count = 100;
[SetUp]
public void Setup() => Schedule(() =>
{
@ -46,7 +48,7 @@ namespace osu.Game.Tests.Visual.UserInterface
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 @@ namespace osu.Game.Tests.Visual.UserInterface
[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", () =>