mirror of https://github.com/ppy/osu
Add test coverage for dismissing customisation area with Escape
This commit is contained in:
parent
2cc56a4b19
commit
8002726c9c
|
@ -164,11 +164,19 @@ public void TestCustomisationToggleState()
|
|||
AddStep("select mod requiring configuration", () => SelectedMods.Value = new[] { new OsuModDifficultyAdjust() });
|
||||
assertCustomisationToggleState(disabled: false, active: true);
|
||||
|
||||
AddStep("dismiss mod customisation", () =>
|
||||
AddStep("dismiss mod customisation via mouse", () =>
|
||||
{
|
||||
InputManager.MoveMouseTo(modSelectScreen.ChildrenOfType<ShearedToggleButton>().Single());
|
||||
InputManager.Click(MouseButton.Left);
|
||||
});
|
||||
assertCustomisationToggleState(disabled: false, active: false);
|
||||
|
||||
AddStep("reset mods", () => SelectedMods.SetDefault());
|
||||
AddStep("select mod requiring configuration", () => SelectedMods.Value = new[] { new OsuModDifficultyAdjust() });
|
||||
assertCustomisationToggleState(disabled: false, active: true);
|
||||
|
||||
AddStep("dismiss mod customisation via keyboard", () => InputManager.Key(Key.Escape));
|
||||
assertCustomisationToggleState(disabled: false, active: false);
|
||||
|
||||
AddStep("append another mod not requiring config", () => SelectedMods.Value = SelectedMods.Value.Append(new OsuModFlashlight()).ToArray());
|
||||
assertCustomisationToggleState(disabled: false, active: false);
|
||||
|
|
Loading…
Reference in New Issue