1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 18:23:04 +08:00

Extend tap timing control test coverage in no point selected case

This commit is contained in:
Bartłomiej Dach 2022-11-23 17:19:58 +01:00
parent 06449b62f1
commit cf5f5a4de3
No known key found for this signature in database

View File

@ -127,10 +127,38 @@ namespace osu.Game.Tests.Visual.Editing
} }
[Test] [Test]
public void TestNoCrashOnTapWhenNoGroupSelected() public void TestNoCrashesWhenNoGroupSelected()
{ {
AddStep("unset selected group", () => selectedGroup.Value = null); AddStep("unset selected group", () => selectedGroup.Value = null);
AddStep("press T to tap", () => InputManager.Key(Key.T)); AddStep("press T to tap", () => InputManager.Key(Key.T));
AddStep("click tap button", () =>
{
control.ChildrenOfType<OsuButton>()
.Last()
.TriggerClick();
});
AddStep("click reset button", () =>
{
control.ChildrenOfType<OsuButton>()
.First()
.TriggerClick();
});
AddStep("adjust offset", () =>
{
var adjustOffsetButton = control.ChildrenOfType<TimingAdjustButton>().First();
InputManager.MoveMouseTo(adjustOffsetButton);
InputManager.Click(MouseButton.Left);
});
AddStep("adjust BPM", () =>
{
var adjustBPMButton = control.ChildrenOfType<TimingAdjustButton>().Last();
InputManager.MoveMouseTo(adjustBPMButton);
InputManager.Click(MouseButton.Left);
});
} }
protected override void Dispose(bool isDisposing) protected override void Dispose(bool isDisposing)