1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-05 07:42:54 +08:00

Add failing test for another regressing behavior

This commit is contained in:
Joehu 2020-08-02 12:47:23 -07:00
parent ba77fa2945
commit d49e54deb6

View File

@ -104,5 +104,37 @@ namespace osu.Game.Tests.Visual.Settings
});
}
}
[Test]
public void TestClickRowSelectsFirstBinding()
{
KeyBindingRow backBindingRow = null;
AddStep("click back binding row", () =>
{
backBindingRow = panel.ChildrenOfType<KeyBindingRow>().ElementAt(10);
InputManager.MoveMouseTo(backBindingRow);
InputManager.Click(MouseButton.Left);
});
AddAssert("first binding selected", () => backBindingRow.Buttons.First().IsBinding);
AddStep("click second binding", () =>
{
var target = backBindingRow.Buttons.ElementAt(1);
InputManager.MoveMouseTo(target);
InputManager.Click(MouseButton.Left);
});
AddStep("click back binding row", () =>
{
backBindingRow = panel.ChildrenOfType<KeyBindingRow>().ElementAt(10);
InputManager.MoveMouseTo(backBindingRow);
InputManager.Click(MouseButton.Left);
});
AddAssert("first binding selected", () => backBindingRow.Buttons.First().IsBinding);
}
}
}