mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:02:55 +08:00
Fix TestSceneKeyBindingPanel
failures
This commit is contained in:
parent
af47f9fd70
commit
6f672b8cb3
@ -13,7 +13,6 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
using osu.Game.Graphics.UserInterfaceV2;
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Localisation;
|
using osu.Game.Localisation;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Overlays.Settings;
|
|
||||||
using osu.Game.Overlays.Settings.Sections.Input;
|
using osu.Game.Overlays.Settings.Sections.Input;
|
||||||
using osu.Game.Rulesets.Taiko;
|
using osu.Game.Rulesets.Taiko;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
@ -152,7 +151,7 @@ namespace osu.Game.Tests.Visual.Settings
|
|||||||
AddStep("click first row with two bindings", () =>
|
AddStep("click first row with two bindings", () =>
|
||||||
{
|
{
|
||||||
multiBindingRow = panel.ChildrenOfType<KeyBindingRow>().First(row => row.Defaults.Count() > 1);
|
multiBindingRow = panel.ChildrenOfType<KeyBindingRow>().First(row => row.Defaults.Count() > 1);
|
||||||
InputManager.MoveMouseTo(multiBindingRow);
|
InputManager.MoveMouseTo(multiBindingRow.ChildrenOfType<OsuSpriteText>().First());
|
||||||
InputManager.Click(MouseButton.Left);
|
InputManager.Click(MouseButton.Left);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -256,7 +255,7 @@ namespace osu.Game.Tests.Visual.Settings
|
|||||||
AddStep("click first row with two bindings", () =>
|
AddStep("click first row with two bindings", () =>
|
||||||
{
|
{
|
||||||
multiBindingRow = panel.ChildrenOfType<KeyBindingRow>().First(row => row.Defaults.Count() > 1);
|
multiBindingRow = panel.ChildrenOfType<KeyBindingRow>().First(row => row.Defaults.Count() > 1);
|
||||||
InputManager.MoveMouseTo(multiBindingRow);
|
InputManager.MoveMouseTo(multiBindingRow.ChildrenOfType<OsuSpriteText>().First());
|
||||||
InputManager.Click(MouseButton.Left);
|
InputManager.Click(MouseButton.Left);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -305,7 +304,6 @@ namespace osu.Game.Tests.Visual.Settings
|
|||||||
section.ChildrenOfType<ResetButton>().Single().TriggerClick();
|
section.ChildrenOfType<ResetButton>().Single().TriggerClick();
|
||||||
});
|
});
|
||||||
AddStep("move mouse to centre", () => InputManager.MoveMouseTo(panel.ScreenSpaceDrawQuad.Centre));
|
AddStep("move mouse to centre", () => InputManager.MoveMouseTo(panel.ScreenSpaceDrawQuad.Centre));
|
||||||
AddUntilStep("wait for collapsed", () => panel.ChildrenOfType<SettingsSidebar>().Single().Expanded.Value, () => Is.False);
|
|
||||||
scrollToAndStartBinding("Left (rim)");
|
scrollToAndStartBinding("Left (rim)");
|
||||||
AddStep("attempt to bind M1 to two keys", () => InputManager.Click(MouseButton.Left));
|
AddStep("attempt to bind M1 to two keys", () => InputManager.Click(MouseButton.Left));
|
||||||
|
|
||||||
@ -325,7 +323,6 @@ namespace osu.Game.Tests.Visual.Settings
|
|||||||
section.ChildrenOfType<ResetButton>().Single().TriggerClick();
|
section.ChildrenOfType<ResetButton>().Single().TriggerClick();
|
||||||
});
|
});
|
||||||
AddStep("move mouse to centre", () => InputManager.MoveMouseTo(panel.ScreenSpaceDrawQuad.Centre));
|
AddStep("move mouse to centre", () => InputManager.MoveMouseTo(panel.ScreenSpaceDrawQuad.Centre));
|
||||||
AddUntilStep("wait for collapsed", () => panel.ChildrenOfType<SettingsSidebar>().Single().Expanded.Value, () => Is.False);
|
|
||||||
scrollToAndStartBinding("Left (rim)");
|
scrollToAndStartBinding("Left (rim)");
|
||||||
AddStep("attempt to bind M1 to two keys", () => InputManager.Click(MouseButton.Left));
|
AddStep("attempt to bind M1 to two keys", () => InputManager.Click(MouseButton.Left));
|
||||||
|
|
||||||
@ -345,7 +342,6 @@ namespace osu.Game.Tests.Visual.Settings
|
|||||||
section.ChildrenOfType<ResetButton>().Single().TriggerClick();
|
section.ChildrenOfType<ResetButton>().Single().TriggerClick();
|
||||||
});
|
});
|
||||||
AddStep("move mouse to centre", () => InputManager.MoveMouseTo(panel.ScreenSpaceDrawQuad.Centre));
|
AddStep("move mouse to centre", () => InputManager.MoveMouseTo(panel.ScreenSpaceDrawQuad.Centre));
|
||||||
AddUntilStep("wait for collapsed", () => panel.ChildrenOfType<SettingsSidebar>().Single().Expanded.Value, () => Is.False);
|
|
||||||
scrollToAndStartBinding("Left (centre)");
|
scrollToAndStartBinding("Left (centre)");
|
||||||
AddStep("clear binding", () =>
|
AddStep("clear binding", () =>
|
||||||
{
|
{
|
||||||
@ -377,7 +373,6 @@ namespace osu.Game.Tests.Visual.Settings
|
|||||||
section.ChildrenOfType<ResetButton>().Single().TriggerClick();
|
section.ChildrenOfType<ResetButton>().Single().TriggerClick();
|
||||||
});
|
});
|
||||||
AddStep("move mouse to centre", () => InputManager.MoveMouseTo(panel.ScreenSpaceDrawQuad.Centre));
|
AddStep("move mouse to centre", () => InputManager.MoveMouseTo(panel.ScreenSpaceDrawQuad.Centre));
|
||||||
AddUntilStep("wait for collapsed", () => panel.ChildrenOfType<SettingsSidebar>().Single().Expanded.Value, () => Is.False);
|
|
||||||
scrollToAndStartBinding("Left (centre)");
|
scrollToAndStartBinding("Left (centre)");
|
||||||
AddStep("clear binding", () =>
|
AddStep("clear binding", () =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user