mirror of
https://github.com/ppy/osu
synced 2025-04-01 22:48:33 +00: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));
|
AddStep("press enter again", () => InputManager.Key(Key.Enter));
|
||||||
AddAssert("hidden deselected", () => !getPanelForMod(typeof(OsuModHidden)).Active.Value);
|
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("clear search", () => modSelectOverlay.SearchTerm = string.Empty);
|
||||||
AddStep("press enter", () => InputManager.Key(Key.Enter));
|
AddStep("press enter", () => InputManager.Key(Key.Enter));
|
||||||
AddAssert("mod select hidden", () => modSelectOverlay.State.Value == Visibility.Hidden);
|
AddAssert("mod select hidden", () => modSelectOverlay.State.Value == Visibility.Hidden);
|
||||||
|
Loading…
Reference in New Issue
Block a user