From 84fe3699f641b3489eda5730a2f94ea2317e53ad Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 23 May 2024 14:31:20 +0800 Subject: [PATCH] Reorder test steps to work better on multiple runs --- .../UserInterface/TestSceneMainMenuButton.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneMainMenuButton.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneMainMenuButton.cs index 921e28d607..5914898cb1 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneMainMenuButton.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneMainMenuButton.cs @@ -39,12 +39,7 @@ namespace osu.Game.Tests.Visual.UserInterface [Test] public void TestDailyChallengeButton() { - AddStep("add button", () => Child = new DailyChallengeButton(@"button-default-select", new Color4(102, 68, 204, 255), _ => { }, 0, Key.D) - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - ButtonSystemState = ButtonSystemState.TopLevel, - }); + AddStep("beatmap of the day not active", () => metadataClient.DailyChallengeUpdated(null)); AddStep("set up API", () => dummyAPI.HandleRequest = req => { @@ -72,12 +67,17 @@ namespace osu.Game.Tests.Visual.UserInterface } }); + AddStep("add button", () => Child = new DailyChallengeButton(@"button-default-select", new Color4(102, 68, 204, 255), _ => { }, 0, Key.D) + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + ButtonSystemState = ButtonSystemState.TopLevel, + }); + AddStep("beatmap of the day active", () => metadataClient.DailyChallengeUpdated(new DailyChallengeInfo { RoomID = 1234, })); - - AddStep("beatmap of the day not active", () => metadataClient.DailyChallengeUpdated(null)); } } }