1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 20:32:55 +08:00

Fix failing tests

This commit is contained in:
smoogipoo 2021-04-23 00:49:14 +09:00
parent 90ecda91af
commit b25340653d

View File

@ -120,9 +120,12 @@ namespace osu.Game.Tests.Visual.Multiplayer
}; };
}); });
[Test] [TestCase(MultiplayerRoomState.Open)]
public void TestEnabledWhenRoomOpen() [TestCase(MultiplayerRoomState.WaitingForLoad)]
[TestCase(MultiplayerRoomState.Playing)]
public void TestEnabledWhenRoomOpenOrInGameplay(MultiplayerRoomState roomState)
{ {
AddStep($"change room to {roomState}", () => Client.ChangeRoomState(roomState));
assertSpectateButtonEnablement(true); assertSpectateButtonEnablement(true);
} }
@ -137,12 +140,10 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddAssert("user is idle", () => Client.Room?.Users[0].State == MultiplayerUserState.Idle); AddAssert("user is idle", () => Client.Room?.Users[0].State == MultiplayerUserState.Idle);
} }
[TestCase(MultiplayerRoomState.WaitingForLoad)]
[TestCase(MultiplayerRoomState.Playing)]
[TestCase(MultiplayerRoomState.Closed)] [TestCase(MultiplayerRoomState.Closed)]
public void TestDisabledDuringGameplayOrClosed(MultiplayerRoomState roomState) public void TestDisabledWhenClosed(MultiplayerRoomState roomState)
{ {
AddStep($"change user to {roomState}", () => Client.ChangeRoomState(roomState)); AddStep($"change room to {roomState}", () => Client.ChangeRoomState(roomState));
assertSpectateButtonEnablement(false); assertSpectateButtonEnablement(false);
} }