mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 12:42:54 +08:00
Update test to cover non-ordered selection
This commit is contained in:
parent
0ddeff648d
commit
740b9fb3a0
@ -98,15 +98,24 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
|
|||||||
|
|
||||||
AddStep("place first object", () => InputManager.Click(MouseButton.Left));
|
AddStep("place first object", () => InputManager.Click(MouseButton.Left));
|
||||||
|
|
||||||
|
AddStep("increment time", () => EditorClock.SeekForward(true));
|
||||||
|
|
||||||
AddStep("move mouse right", () => InputManager.MoveMouseTo(playfield.ScreenSpaceDrawQuad.Centre + new Vector2(playfield.ScreenSpaceDrawQuad.Width * 0.2f, 0)));
|
AddStep("move mouse right", () => InputManager.MoveMouseTo(playfield.ScreenSpaceDrawQuad.Centre + new Vector2(playfield.ScreenSpaceDrawQuad.Width * 0.2f, 0)));
|
||||||
AddStep("place second object", () => InputManager.Click(MouseButton.Left));
|
AddStep("place second object", () => InputManager.Click(MouseButton.Left));
|
||||||
|
|
||||||
|
AddStep("increment time", () => EditorClock.SeekForward(true));
|
||||||
|
|
||||||
AddStep("move mouse down", () => InputManager.MoveMouseTo(playfield.ScreenSpaceDrawQuad.Centre + new Vector2(0, playfield.ScreenSpaceDrawQuad.Width * 0.2f)));
|
AddStep("move mouse down", () => InputManager.MoveMouseTo(playfield.ScreenSpaceDrawQuad.Centre + new Vector2(0, playfield.ScreenSpaceDrawQuad.Width * 0.2f)));
|
||||||
AddStep("place third object", () => InputManager.Click(MouseButton.Left));
|
AddStep("place third object", () => InputManager.Click(MouseButton.Left));
|
||||||
|
|
||||||
AddStep("enter selection mode", () => InputManager.Key(Key.Number1));
|
AddStep("enter selection mode", () => InputManager.Key(Key.Number1));
|
||||||
|
|
||||||
AddStep("select objects 2 and 3", () => EditorBeatmap.SelectedHitObjects.AddRange(EditorBeatmap.HitObjects.Skip(1)));
|
AddStep("select objects 2 and 3", () =>
|
||||||
|
{
|
||||||
|
// add selection backwards to test non-sequential time ordering
|
||||||
|
EditorBeatmap.SelectedHitObjects.Add(EditorBeatmap.HitObjects[2]);
|
||||||
|
EditorBeatmap.SelectedHitObjects.Add(EditorBeatmap.HitObjects[1]);
|
||||||
|
});
|
||||||
|
|
||||||
AddStep("begin drag", () => InputManager.PressButton(MouseButton.Left));
|
AddStep("begin drag", () => InputManager.PressButton(MouseButton.Left));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user