1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 06:52:55 +08:00

Use is loaded instead

This commit is contained in:
David Zhao 2019-03-22 15:23:18 +09:00
parent 8fb4de101f
commit c43b1afa30

View File

@ -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);
}