mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 07:23:14 +08:00
Fix test failures due to wrong asserts & uninitialised playlist
* The "create room" button was disabled headless due to not specifying the imported beatmap. In visual tests it seems to work due to selecting from the local database randomly. * The test asserts are brought in line with expectations.
This commit is contained in:
parent
b74b09eb3a
commit
de034b4d9c
@ -125,17 +125,25 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
createRoom(() => new Room
|
||||
{
|
||||
Name = { Value = "Test Room" },
|
||||
Type = { Value = MatchType.TeamVersus }
|
||||
Type = { Value = MatchType.HeadToHead },
|
||||
Playlist =
|
||||
{
|
||||
new PlaylistItem
|
||||
{
|
||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.RulesetID == 0)).BeatmapInfo },
|
||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
AddUntilStep("match type versus", () => client.APIRoom?.Type.Value == MatchType.HeadToHead);
|
||||
AddUntilStep("match type head to head", () => 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);
|
||||
AddUntilStep("api room updated to team versus", () => client.APIRoom?.Type.Value == MatchType.TeamVersus);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
Loading…
Reference in New Issue
Block a user