From aa7efe6141e0ca80c3a908e3902b1dba5c95d4e9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 14 Feb 2020 15:26:55 +0900 Subject: [PATCH] Fix tests potentially failing due to timing issues --- .../Online/TestSceneOnlineViewContainer.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneOnlineViewContainer.cs b/osu.Game.Tests/Visual/Online/TestSceneOnlineViewContainer.cs index 39b9fd71d0..d656600a18 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneOnlineViewContainer.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneOnlineViewContainer.cs @@ -61,8 +61,8 @@ namespace osu.Game.Tests.Visual.Online { AddStep("set status to online", () => ((DummyAPIAccess)API).State = APIState.Online); - AddAssert("children are visible", () => onlineView.ViewTarget.IsPresent); - AddAssert("loading animation is not visible", () => !onlineView.LoadingAnimation.IsPresent); + AddUntilStep("children are visible", () => onlineView.ViewTarget.IsPresent); + AddUntilStep("loading animation is not visible", () => !onlineView.LoadingAnimation.IsPresent); } [Test] @@ -70,8 +70,8 @@ namespace osu.Game.Tests.Visual.Online { AddStep("set status to offline", () => ((DummyAPIAccess)API).State = APIState.Offline); - AddAssert("children are hidden", () => !onlineView.ViewTarget.IsPresent); - AddAssert("loading animation is not visible", () => !onlineView.LoadingAnimation.IsPresent); + AddUntilStep("children are not visible", () => !onlineView.ViewTarget.IsPresent); + AddUntilStep("loading animation is not visible", () => !onlineView.LoadingAnimation.IsPresent); } [Test] @@ -79,8 +79,8 @@ namespace osu.Game.Tests.Visual.Online { AddStep("set status to connecting", () => ((DummyAPIAccess)API).State = APIState.Connecting); - AddAssert("children are hidden", () => !onlineView.ViewTarget.IsPresent); - AddAssert("loading animation is visible", () => onlineView.LoadingAnimation.IsPresent); + AddUntilStep("children are not visible", () => !onlineView.ViewTarget.IsPresent); + AddUntilStep("loading animation is visible", () => onlineView.LoadingAnimation.IsPresent); } [Test] @@ -88,8 +88,8 @@ namespace osu.Game.Tests.Visual.Online { AddStep("set status to failing", () => ((DummyAPIAccess)API).State = APIState.Failing); - AddAssert("children are hidden", () => !onlineView.ViewTarget.IsPresent); - AddAssert("loading animation is visible", () => onlineView.LoadingAnimation.IsPresent); + AddUntilStep("children are not visible", () => !onlineView.ViewTarget.IsPresent); + AddUntilStep("loading animation is visible", () => onlineView.LoadingAnimation.IsPresent); } } }