From ae47eb61caf9ef810cd0d2d56f12164d78f45c05 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 26 Dec 2018 20:42:47 +0900 Subject: [PATCH] Fix test not working when not logged in --- .../TestCaseUpdateableBeatmapBackgroundSprite.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/osu.Game.Tests/Visual/TestCaseUpdateableBeatmapBackgroundSprite.cs b/osu.Game.Tests/Visual/TestCaseUpdateableBeatmapBackgroundSprite.cs index 24701fccbc..bc449f645b 100644 --- a/osu.Game.Tests/Visual/TestCaseUpdateableBeatmapBackgroundSprite.cs +++ b/osu.Game.Tests/Visual/TestCaseUpdateableBeatmapBackgroundSprite.cs @@ -40,12 +40,18 @@ namespace osu.Game.Tests.Visual AddStep("imported", () => beatmapBindable.Value = imported.Beatmaps.First()); if (api.IsLoggedIn) + { AddUntilStep(() => req.Result != null, "wait for api response"); - AddStep("online", () => beatmapBindable.Value = new BeatmapInfo + AddStep("online", () => beatmapBindable.Value = new BeatmapInfo + { + BeatmapSet = req.Result?.ToBeatmapSet(rulesets) + }); + } + else { - BeatmapSet = req.Result?.ToBeatmapSet(rulesets) - }); + AddStep("online (login first)", () => { }); + } } } }