1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-19 05:09:54 +08:00

Add failing test

This commit is contained in:
Dan Balasescu
2025-11-21 16:24:08 +09:00
Unverified
parent d465bee0ab
commit 15ee49348d
@@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Screens;
using osu.Framework.Testing;
using osu.Framework.Utils;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Multiplayer;
@@ -107,5 +108,25 @@ namespace osu.Game.Tests.Visual.Matchmaking
screen.RollFinalBeatmap(candidateItems, finalItem);
});
}
[Test]
public void TestExpiredBeatmapNotShown()
{
SubScreenBeatmapSelect screen = null!;
AddStep("add screen with expired items", () =>
{
MultiplayerClient.ClientRoom!.Playlist =
[
new MultiplayerPlaylistItem(items[0]) { Expired = true },
new MultiplayerPlaylistItem(items[1])
];
Child = new ScreenStack(screen = new SubScreenBeatmapSelect());
});
AddUntilStep("items displayed", () => screen.ChildrenOfType<MatchmakingSelectPanelBeatmap>().Any());
AddAssert("expired item not shown", () => screen.ChildrenOfType<MatchmakingSelectPanelBeatmap>().Count(), () => Is.EqualTo(1));
}
}
}