mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 07:22:55 +08:00
Add test coverage of match type propagating to other users' settings
This commit is contained in:
parent
5d5f958e44
commit
049d9ce5ef
@ -11,6 +11,7 @@ using osu.Framework.Testing;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Multiplayer.MatchTypes.TeamVersus;
|
using osu.Game.Online.Multiplayer.MatchTypes.TeamVersus;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
@ -118,6 +119,25 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
AddAssert("user still on team 0", () => (client.Room?.Users.FirstOrDefault()?.MatchState as TeamVersusUserState)?.TeamID == 0);
|
AddAssert("user still on team 0", () => (client.Room?.Users.FirstOrDefault()?.MatchState as TeamVersusUserState)?.TeamID == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestSettingsUpdatedWhenChangingQueueMode()
|
||||||
|
{
|
||||||
|
createRoom(() => new Room
|
||||||
|
{
|
||||||
|
Name = { Value = "Test Room" },
|
||||||
|
Type = { Value = MatchType.TeamVersus }
|
||||||
|
});
|
||||||
|
|
||||||
|
AddUntilStep("match type versus", () => client.APIRoom?.Type.Value == MatchType.HeadToHead);
|
||||||
|
|
||||||
|
AddStep("change match type", () => client.ChangeSettings(new MultiplayerRoomSettings
|
||||||
|
{
|
||||||
|
MatchType = MatchType.TeamVersus
|
||||||
|
}));
|
||||||
|
|
||||||
|
AddUntilStep("api room updated", () => client.APIRoom?.Type.Value == MatchType.TeamVersus);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestChangeTypeViaMatchSettings()
|
public void TestChangeTypeViaMatchSettings()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user