1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-21 02:19:55 +08:00

Adjust testcase to avoid random failures (#4735)

Adjust testcase to avoid random failures

Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
Dean Herbert
2019-05-09 10:49:07 +09:00
committed by GitHub
Unverified
@@ -107,7 +107,7 @@ namespace osu.Game.Tests.Visual.UserInterface
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
Spacing = new Vector2(10),
Padding = new MarginPadding { Bottom = 250 }
Padding = new MarginPadding { Bottom = 550 }
}
};
@@ -132,11 +132,9 @@ namespace osu.Game.Tests.Visual.UserInterface
var loadedBackgrounds = backgrounds.Where(b => b.ContentLoaded);
int initialLoadCount = 0;
AddUntilStep("some loaded", () => (initialLoadCount = loadedBackgrounds.Count()) > 0);
AddUntilStep("some loaded", () => loadedBackgrounds.Any());
AddStep("scroll to bottom", () => scrollContainer.ScrollToEnd());
AddUntilStep("some unloaded", () => loadedBackgrounds.Count() < initialLoadCount);
AddUntilStep("all unloaded", () => !loadedBackgrounds.Any());
}
private class TestUpdateableBeatmapBackgroundSprite : UpdateableBeatmapBackgroundSprite