From de034b4d9c93d09e9ce4695fbccf13fe648f9414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 30 Nov 2021 20:57:02 +0100 Subject: [PATCH] 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. --- .../Visual/Multiplayer/TestSceneTeamVersus.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/osu.Game.Tests/Visual/Multiplayer/TestSceneTeamVersus.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneTeamVersus.cs index ab9dc9c989..981989c28a 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestSceneTeamVersus.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneTeamVersus.cs @@ -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]