From aed4634fe00fd91343bcff6701f84cfc85976814 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Tue, 21 May 2019 14:48:14 +0900 Subject: [PATCH] Consolidate loader animation tests --- .../Visual/Menus/TestSceneLoaderAnimation.cs | 32 ++----------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/osu.Game.Tests/Visual/Menus/TestSceneLoaderAnimation.cs b/osu.Game.Tests/Visual/Menus/TestSceneLoaderAnimation.cs index 813d4df708..000832b784 100644 --- a/osu.Game.Tests/Visual/Menus/TestSceneLoaderAnimation.cs +++ b/osu.Game.Tests/Visual/Menus/TestSceneLoaderAnimation.cs @@ -53,38 +53,12 @@ namespace osu.Game.Tests.Visual.Menus } [Test] - public void TestShortLoad() + public void TestDelayedLoad() { - bool logoVisible = false; - AddStep("begin loading", () => LoadScreen(loader = new TestLoader())); - AddWaitStep("wait", 3); - AddStep("finish loading", () => - { - logoVisible = loader.Logo?.Alpha > 0; - loader.AllowLoad.Set(); - }); - + AddUntilStep("wait for logo visible", () => loader.Logo?.Alpha > 0); + AddStep("finish loading", () => loader.AllowLoad.Set()); AddAssert("loaded", () => loader.Logo != null && loader.ScreenLoaded); - AddAssert("logo was visible", () => logoVisible); - AddUntilStep("logo gone", () => loader.Logo?.Alpha == 0); - } - - [Test] - public void TestLongLoad() - { - bool logoVisible = false; - - AddStep("begin loading", () => LoadScreen(loader = new TestLoader())); - AddWaitStep("wait", 10); - AddStep("finish loading", () => - { - logoVisible = loader.Logo?.Alpha > 0; - loader.AllowLoad.Set(); - }); - - AddAssert("loaded", () => loader.Logo != null && loader.ScreenLoaded); - AddAssert("logo was visible", () => logoVisible); AddUntilStep("logo gone", () => loader.Logo?.Alpha == 0); }