Skip to content

Commit 0a6a23a

Browse files
committed
Add test for triple click drag not changing text selection
1 parent 95b39dc commit 0a6a23a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

osu.Framework.Tests/Visual/UserInterface/TestSceneTextBox.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,16 @@ public void TestTripleClickSelectAll()
949949
AddWaitStep("wait to fail triple click", 2);
950950
AddStep("third click", () => InputManager.Click(MouseButton.Left));
951951
AddAssert("no text selected", () => textBox.SelectedText, () => Is.EqualTo(string.Empty));
952+
953+
AddStep("triple click drag", () =>
954+
{
955+
InputManager.Click(MouseButton.Left);
956+
InputManager.Click(MouseButton.Left);
957+
InputManager.PressButton(MouseButton.Left);
958+
});
959+
AddStep("start drag", () => InputManager.MoveMouseTo(textBox.ScreenSpaceDrawQuad.TopLeft - new Vector2(200f, 0f)));
960+
AddStep("end drag", () => InputManager.ReleaseButton(MouseButton.Left));
961+
AddAssert("all text selected", () => textBox.SelectedText, () => Is.EqualTo(textBox.Text));
952962
}
953963

954964
[Test]

0 commit comments

Comments
 (0)