From fbba8293c76965b49a1db3cc4e6853cd1df7be89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 20 Dec 2021 21:01:11 +0100 Subject: [PATCH] Add failing test for expected multiple path drag UX --- .../TestSceneSliderControlPointPiece.cs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/osu.Game.Rulesets.Osu.Tests/Editor/TestSceneSliderControlPointPiece.cs b/osu.Game.Rulesets.Osu.Tests/Editor/TestSceneSliderControlPointPiece.cs index 6bfe7f892b..282e7a479e 100644 --- a/osu.Game.Rulesets.Osu.Tests/Editor/TestSceneSliderControlPointPiece.cs +++ b/osu.Game.Rulesets.Osu.Tests/Editor/TestSceneSliderControlPointPiece.cs @@ -60,6 +60,34 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor assertControlPointType(0, PathType.PerfectCurve); } + [Test] + public void TestDragMultipleControlPoints() + { + moveMouseToControlPoint(2); + AddStep("click", () => InputManager.Click(MouseButton.Left)); + + AddStep("hold control", () => InputManager.PressKey(Key.LControl)); + + moveMouseToControlPoint(3); + AddStep("click", () => InputManager.Click(MouseButton.Left)); + + moveMouseToControlPoint(4); + AddStep("click", () => InputManager.Click(MouseButton.Left)); + + moveMouseToControlPoint(2); + addMovementStep(new Vector2(450, 50)); + AddStep("release", () => InputManager.ReleaseButton(MouseButton.Left)); + + assertControlPointPosition(2, new Vector2(450, 50)); + assertControlPointType(2, PathType.PerfectCurve); + + assertControlPointPosition(3, new Vector2(550, 50)); + + assertControlPointPosition(4, new Vector2(550, 200)); + + AddStep("release control", () => InputManager.ReleaseKey(Key.LControl)); + } + [Test] public void TestDragControlPointAlmostLinearlyExterior() {