mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 17:03:02 +08:00
Attempt to fix flaky PlaylistOverlay
test
This commit is contained in:
parent
f15698d025
commit
cd9eaf215b
@ -27,6 +27,8 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
private Live<BeatmapSetInfo> first;
|
private Live<BeatmapSetInfo> first;
|
||||||
|
|
||||||
|
private const int item_count = 100;
|
||||||
|
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public void Setup() => Schedule(() =>
|
public void Setup() => Schedule(() =>
|
||||||
{
|
{
|
||||||
@ -46,7 +48,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
beatmapSets.Clear();
|
beatmapSets.Clear();
|
||||||
|
|
||||||
for (int i = 0; i < 100; i++)
|
for (int i = 0; i < item_count; i++)
|
||||||
{
|
{
|
||||||
beatmapSets.Add(TestResources.CreateTestBeatmapSetInfo().ToLiveUnmanaged());
|
beatmapSets.Add(TestResources.CreateTestBeatmapSetInfo().ToLiveUnmanaged());
|
||||||
}
|
}
|
||||||
@ -59,6 +61,13 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestRearrangeItems()
|
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());
|
AddUntilStep("wait for animations to complete", () => !playlistOverlay.Transforms.Any());
|
||||||
|
|
||||||
AddStep("hold 1st item handle", () =>
|
AddStep("hold 1st item handle", () =>
|
||||||
|
Loading…
Reference in New Issue
Block a user