From c43b1afa305d1b017c0e02437d4ed422500a118e Mon Sep 17 00:00:00 2001 From: David Zhao Date: Fri, 22 Mar 2019 15:23:18 +0900 Subject: [PATCH] Use is loaded instead --- osu.Game.Tests/Visual/TestCaseOsuScreenStack.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/osu.Game.Tests/Visual/TestCaseOsuScreenStack.cs b/osu.Game.Tests/Visual/TestCaseOsuScreenStack.cs index 51d6c50643..bbf8dc5b01 100644 --- a/osu.Game.Tests/Visual/TestCaseOsuScreenStack.cs +++ b/osu.Game.Tests/Visual/TestCaseOsuScreenStack.cs @@ -26,17 +26,16 @@ namespace osu.Game.Tests.Visual { AddStep("Create new screen stack", () => { Child = stack = new TestOsuScreenStack { RelativeSizeAxes = Axes.Both }; }); AddStep("Push new base screen", () => stack.Push(baseScreen = new NoParallaxTestScreen("THIS IS SCREEN 1. THIS SCREEN SHOULD HAVE NO PARALLAX."))); - AddUntilStep("Wait for Screen 1 to be current", baseScreen.IsCurrentScreen); + AddUntilStep("Wait for Screen 1 to be current", () => baseScreen.IsLoaded); } [Test] public void ParallaxAssignmentTest() { AddStep("Push new screen to base screen", () => baseScreen.Push(newScreen = new TestScreen("THIS IS SCREEN 2. THIS SCREEN SHOULD HAVE PARALLAX."))); - AddUntilStep("Wait for Screen 2 to be current", newScreen.IsCurrentScreen); + AddUntilStep("Wait for Screen 2 to be current", () => newScreen.IsLoaded); AddAssert("Parallax is correct", () => stack.IsParallaxSet); AddStep("Exit from new screen", () => { baseScreen.MakeCurrent(); }); - AddUntilStep("Wait for Screen 1 to be current", baseScreen.IsCurrentScreen); AddAssert("Parallax is correct", () => stack.IsParallaxSet); }