1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 16:03:01 +08:00

Use AddUntilStep instead of AddWaitStep

This commit is contained in:
Jamie Taylor 2019-03-06 19:57:09 +09:00
parent b5e89e2f3b
commit 8a69fc5534
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C

View File

@ -36,11 +36,9 @@ namespace osu.Game.Tests.Visual
api.Queue(req); api.Queue(req);
AddStep("load null beatmap", () => beatmapBindable.Value = null); AddStep("load null beatmap", () => beatmapBindable.Value = null);
AddWaitStep(20, "wait for transition..."); AddUntilStep(() => backgroundSprite.ChildCount == 1, "wait for cleanup...");
AddAssert("ensure only 1 child is present", () => backgroundSprite.ChildCount == 1);
AddStep("load imported beatmap", () => beatmapBindable.Value = imported.Beatmaps.First()); AddStep("load imported beatmap", () => beatmapBindable.Value = imported.Beatmaps.First());
AddWaitStep(20, "wait for transition..."); AddUntilStep(() => backgroundSprite.ChildCount == 1, "wait for cleanup...");
AddAssert("ensure only 1 child is present", () => backgroundSprite.ChildCount == 1);
if (api.IsLoggedIn) if (api.IsLoggedIn)
{ {
@ -49,8 +47,7 @@ namespace osu.Game.Tests.Visual
{ {
BeatmapSet = req.Result?.ToBeatmapSet(rulesets) BeatmapSet = req.Result?.ToBeatmapSet(rulesets)
}); });
AddWaitStep(20, "wait for transition..."); AddUntilStep(() => backgroundSprite.ChildCount == 1, "wait for cleanup...");
AddAssert("ensure only 1 child is present", () => backgroundSprite.ChildCount == 1);
} }
else else
{ {