mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 21:43:04 +08:00
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.
This commit is contained in:
parent
51386bb48d
commit
87051d5d61
@ -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<OsuButton>().Single().Enabled.Value);
|
||||
}
|
||||
|
||||
[TestCase(true)]
|
||||
|
Loading…
Reference in New Issue
Block a user