From 6af30a3d45ef7d4a971082be060407778c148a4b Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Sat, 4 May 2024 20:02:35 +0800 Subject: [PATCH] add test for non-td system mod --- .../Visual/UserInterface/TestSceneModPresetPanel.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneModPresetPanel.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneModPresetPanel.cs index d0303b3849..9a141e0df0 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneModPresetPanel.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneModPresetPanel.cs @@ -149,6 +149,15 @@ namespace osu.Game.Tests.Visual.UserInterface // touch device should be removed due to incompatible with autoplay. assertSelectedModsEquivalentTo(new Mod[] { new OsuModAutoplay() }); + + AddStep("deactivate panel", () => panel.AsNonNull().TriggerClick()); + assertSelectedModsEquivalentTo(Array.Empty()); + + // just for test purpose + AddStep("Add score v2 to selected mod", () => SelectedMods.Value = new Mod[] { new ModScoreV2() }); + AddStep("activate panel", () => panel.AsNonNull().TriggerClick()); + + assertSelectedModsEquivalentTo(new Mod[] { new OsuModAutoplay(), new ModScoreV2() }); } private void assertSelectedModsEquivalentTo(IEnumerable mods)