From 87051d5d61c71c8045c668686fe5b3020cb548a6 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 20 Dec 2021 17:46:20 +0900 Subject: [PATCH] Add better defined steps to `TestLoseHostWhileReady` ready button test Not 100% sure this will solve the issue but it's worth a try. The button state checks are using `Until` everywhere else so this brings the test in line with the standards. As seen https://github.com/ppy/osu/runs/4579641456?check_suite_focus=true. --- .../Visual/Multiplayer/TestSceneMultiplayerReadyButton.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerReadyButton.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerReadyButton.cs index 84b63a5733..81220e2527 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerReadyButton.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerReadyButton.cs @@ -163,10 +163,13 @@ namespace osu.Game.Tests.Visual.Multiplayer }); addClickButtonStep(); + AddUntilStep("user is ready", () => Client.Room?.Users[0].State == MultiplayerUserState.Ready); + AddStep("transfer host", () => Client.TransferHost(Client.Room?.Users[1].UserID ?? 0)); addClickButtonStep(); - AddAssert("match not started", () => Client.Room?.Users[0].State == MultiplayerUserState.Idle); + AddUntilStep("user is idle (match not started)", () => Client.Room?.Users[0].State == MultiplayerUserState.Idle); + AddAssert("ready button enabled", () => button.ChildrenOfType().Single().Enabled.Value); } [TestCase(true)]