diff --git a/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchStartControl.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchStartControl.cs index f0a2a28b34..e58b9893ce 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchStartControl.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchStartControl.cs @@ -185,6 +185,31 @@ namespace osu.Game.Tests.Visual.Multiplayer AddAssert("countdown still active", () => MultiplayerClient.Room?.Countdown != null); } + [Test] + public void TestCountdownButtonVisibilityWithAutoStartEnablement() + { + ClickButtonWhenEnabled(); + AddUntilStep("local user became ready", () => MultiplayerClient.LocalUser?.State == MultiplayerUserState.Ready); + AddUntilStep("countdown button visible", () => this.ChildrenOfType().Single().IsPresent); + + AddStep("enable auto start", () => MultiplayerClient.ChangeSettings(new MultiplayerRoomSettings { AutoStartDuration = TimeSpan.FromMinutes(1) })); + + ClickButtonWhenEnabled(); + AddUntilStep("local user became ready", () => MultiplayerClient.LocalUser?.State == MultiplayerUserState.Ready); + AddUntilStep("countdown button not visible", () => !this.ChildrenOfType().Single().IsPresent); + } + + [Test] + public void TestClickingReadyButtonUnReadiesDuringAutoStart() + { + AddStep("enable auto start", () => MultiplayerClient.ChangeSettings(new MultiplayerRoomSettings { AutoStartDuration = TimeSpan.FromMinutes(1) })); + ClickButtonWhenEnabled(); + AddUntilStep("local user became ready", () => MultiplayerClient.LocalUser?.State == MultiplayerUserState.Ready); + + ClickButtonWhenEnabled(); + AddUntilStep("local user became idle", () => MultiplayerClient.LocalUser?.State == MultiplayerUserState.Idle); + } + [Test] public void TestDeletedBeatmapDisableReady() {