1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 21:52:54 +08:00

Update tests

This commit is contained in:
Cootz 2023-06-04 17:11:04 +03:00
parent 32b9e6ec8f
commit fd554033db
2 changed files with 5 additions and 0 deletions

View File

@ -62,6 +62,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
{ {
createFreeModSelect(); createFreeModSelect();
AddStep("kill search bar focus", () => freeModSelectOverlay.SearchTextBox.KillFocus());
AddStep("press ctrl+a", () => InputManager.Keys(PlatformAction.SelectAll)); AddStep("press ctrl+a", () => InputManager.Keys(PlatformAction.SelectAll));
AddUntilStep("all mods selected", assertAllAvailableModsSelected); AddUntilStep("all mods selected", assertAllAvailableModsSelected);

View File

@ -23,6 +23,7 @@ using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu; using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Mods; using osu.Game.Rulesets.Osu.Mods;
using osu.Game.Rulesets.Taiko.Mods; using osu.Game.Rulesets.Taiko.Mods;
using osu.Game.Screens.OnlinePlay;
using osu.Game.Tests.Mods; using osu.Game.Tests.Mods;
using osuTK; using osuTK;
using osuTK.Input; using osuTK.Input;
@ -569,6 +570,8 @@ namespace osu.Game.Tests.Visual.UserInterface
createScreen(); createScreen();
changeRuleset(0); changeRuleset(0);
AddStep("kill search bar focus", () => modSelectOverlay.SearchTextBox.KillFocus());
AddStep("select DT + HD", () => SelectedMods.Value = new Mod[] { new OsuModDoubleTime(), new OsuModHidden() }); AddStep("select DT + HD", () => SelectedMods.Value = new Mod[] { new OsuModDoubleTime(), new OsuModHidden() });
AddAssert("DT + HD selected", () => modSelectOverlay.ChildrenOfType<ModPanel>().Count(panel => panel.Active.Value) == 2); AddAssert("DT + HD selected", () => modSelectOverlay.ChildrenOfType<ModPanel>().Count(panel => panel.Active.Value) == 2);