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:
parent
e8394e6f74
commit
c0d4ed4789
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user