1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:33:30 +08:00

Add test coverage of select-all-text-in-search when nothing matched

This commit is contained in:
Bartłomiej Dach 2024-01-15 19:07:52 +01:00
parent e8394e6f74
commit c0d4ed4789
No known key found for this signature in database

View File

@ -551,6 +551,14 @@ namespace osu.Game.Tests.Visual.UserInterface
AddStep("press enter again", () => InputManager.Key(Key.Enter));
AddAssert("hidden deselected", () => !getPanelForMod(typeof(OsuModHidden)).Active.Value);
AddStep("apply search matching nothing", () => modSelectOverlay.SearchTerm = "ZZZ");
AddStep("press enter", () => InputManager.Key(Key.Enter));
AddAssert("all text not selected in textbox", () =>
{
var textBox = modSelectOverlay.ChildrenOfType<SearchTextBox>().Single();
return textBox.SelectedText != textBox.Text;
});
AddStep("clear search", () => modSelectOverlay.SearchTerm = string.Empty);
AddStep("press enter", () => InputManager.Key(Key.Enter));
AddAssert("mod select hidden", () => modSelectOverlay.State.Value == Visibility.Hidden);