Fix test failures due to order change

This commit is contained in:
Dean Herbert 2022-02-21 19:48:39 +09:00
parent 02a8500500
commit 98c008b95f
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
[Test]
public void TestBasicListChanges()
{
AddStep("add rooms", () => RoomManager.AddRooms(5));
AddStep("add rooms", () => RoomManager.AddRooms(5, withSpotlightRooms: true));
AddAssert("has 5 rooms", () => container.Rooms.Count == 5);

View File

@ -25,7 +25,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
base.JoinRoom(room, password, onSuccess, onError);
}
public void AddRooms(int count, RulesetInfo ruleset = null, bool withPassword = false)
public void AddRooms(int count, RulesetInfo ruleset = null, bool withPassword = false, bool withSpotlightRooms = false)
{
for (int i = 0; i < count; i++)
{
@ -35,7 +35,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
Name = { Value = $@"Room {currentRoomId}" },
Host = { Value = new APIUser { Username = @"Host" } },
EndDate = { Value = DateTimeOffset.Now + TimeSpan.FromSeconds(10) },
Category = { Value = i % 2 == 0 ? RoomCategory.Spotlight : RoomCategory.Normal },
Category = { Value = withSpotlightRooms && i % 2 == 0 ? RoomCategory.Spotlight : RoomCategory.Normal },
};
if (withPassword)