1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Fix test going offscreen in headless execution

This commit is contained in:
Dean Herbert 2021-04-16 18:54:33 +09:00
parent f824105075
commit b413ffae3e

View File

@ -159,7 +159,7 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
AddStep("Add slider", () =>
{
slider = new Slider { StartTime = EditorClock.CurrentTime, Position = new Vector2(300) };
slider = new Slider { StartTime = EditorClock.CurrentTime, Position = new Vector2(300, 200) };
PathControlPoint[] points =
{
@ -183,9 +183,9 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
AddStep("move mouse to handle", () => InputManager.MoveMouseTo(Editor.ChildrenOfType<SelectionBoxDragHandle>().Skip(1).First()));
AddStep("begin drag", () => InputManager.PressButton(MouseButton.Left));
moveMouse(new Vector2(350, 400));
moveMouse(new Vector2(350, 350));
moveMouse(new Vector2(350, 300));
moveMouse(new Vector2(300, 300));
moveMouse(new Vector2(300, 250));
moveMouse(new Vector2(300, 200));
AddStep("end drag", () => InputManager.ReleaseButton(MouseButton.Left));
AddAssert("slider length shrunk", () => slider.Path.Distance < distanceBefore);