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
1 changed files with 4 additions and 4 deletions

View File

@ -159,7 +159,7 @@ public void TestScalingSliderTooSmallRemainsValid()
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 @@ public void TestScalingSliderTooSmallRemainsValid()
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);