mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:28:00 +08:00
Allow testing settings panel with interactivity by default
This commit is contained in:
parent
d24e10e955
commit
eb836269e7
@ -35,13 +35,19 @@ namespace osu.Game.Tests.Visual.Settings
|
||||
State = { Value = Visibility.Visible }
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
AddStep("reset mouse", () => InputManager.MoveMouseTo(settings));
|
||||
[Test]
|
||||
public void TestBasic()
|
||||
{
|
||||
AddStep("do nothing", () => { });
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestFiltering([Values] bool beforeLoad)
|
||||
{
|
||||
AddStep("reset mouse", () => InputManager.MoveMouseTo(settings));
|
||||
|
||||
if (beforeLoad)
|
||||
AddStep("set filter", () => settings.SectionsContainer.ChildrenOfType<SearchTextBox>().First().Current.Value = "scaling");
|
||||
|
||||
@ -67,6 +73,8 @@ namespace osu.Game.Tests.Visual.Settings
|
||||
[Test]
|
||||
public void TestFilterAfterLoad()
|
||||
{
|
||||
AddStep("reset mouse", () => InputManager.MoveMouseTo(settings));
|
||||
|
||||
AddUntilStep("wait for items to load", () => settings.SectionsContainer.ChildrenOfType<IFilterable>().Any());
|
||||
|
||||
AddStep("set filter", () => settings.SectionsContainer.ChildrenOfType<SearchTextBox>().First().Current.Value = "scaling");
|
||||
@ -75,6 +83,8 @@ namespace osu.Game.Tests.Visual.Settings
|
||||
[Test]
|
||||
public void ToggleVisibility()
|
||||
{
|
||||
AddStep("reset mouse", () => InputManager.MoveMouseTo(settings));
|
||||
|
||||
AddWaitStep("wait some", 5);
|
||||
AddToggleStep("toggle visibility", _ => settings.ToggleVisibility());
|
||||
}
|
||||
@ -82,6 +92,8 @@ namespace osu.Game.Tests.Visual.Settings
|
||||
[Test]
|
||||
public void TestTextboxFocusAfterNestedPanelBackButton()
|
||||
{
|
||||
AddStep("reset mouse", () => InputManager.MoveMouseTo(settings));
|
||||
|
||||
AddUntilStep("sections loaded", () => settings.SectionsContainer.Children.Count > 0);
|
||||
AddUntilStep("top-level textbox focused", () => settings.SectionsContainer.ChildrenOfType<FocusedTextBox>().FirstOrDefault()?.HasFocus == true);
|
||||
|
||||
@ -107,6 +119,8 @@ namespace osu.Game.Tests.Visual.Settings
|
||||
[Test]
|
||||
public void TestTextboxFocusAfterNestedPanelEscape()
|
||||
{
|
||||
AddStep("reset mouse", () => InputManager.MoveMouseTo(settings));
|
||||
|
||||
AddUntilStep("sections loaded", () => settings.SectionsContainer.Children.Count > 0);
|
||||
AddUntilStep("top-level textbox focused", () => settings.SectionsContainer.ChildrenOfType<FocusedTextBox>().FirstOrDefault()?.HasFocus == true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user