1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 09:02:58 +08:00

add test coverage

This commit is contained in:
Gabe Livengood 2022-06-22 17:01:42 -04:00
parent bf5a7e3f2a
commit a03cfbc2d4
No known key found for this signature in database
GPG Key ID: 70321B78DAECE683

View File

@ -157,6 +157,26 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddUntilStep("3 rooms visible", () => container.Rooms.Count(r => r.IsPresent) == 3);
}
[Test]
public void TestLockedFiltering()
{
AddStep("add rooms", () =>
{
RoomManager.AddRooms(1, withPassword: true);
RoomManager.AddRooms(1, withPassword: false);
});
AddUntilStep("both rooms shown", () => container.Rooms.Count(r => r.IsPresent) == 2);
AddStep("filter locked rooms", () => container.Filter.Value = new FilterCriteria { Locked = false });
AddUntilStep("locked room hidden", () => container.Rooms.All(r => !r.Room.HasPassword.Value));
AddStep("unfilter locked rooms", () => container.Filter.SetDefault());
AddUntilStep("both rooms shown", () => container.Rooms.Count(r => r.IsPresent) == 2);
}
[Test]
public void TestPasswordProtectedRooms()
{