mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:02:55 +08:00
Extend tap timing control test coverage in no point selected case
This commit is contained in:
parent
06449b62f1
commit
cf5f5a4de3
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user