Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DragDropTests #8860

Closed
wants to merge 16 commits into from
Closed

Fix DragDropTests #8860

wants to merge 16 commits into from

Conversation

sharwell
Copy link
Member

@sharwell sharwell commented Mar 15, 2023

  • Make sure to start a drag/drop operation on DragEnter (DragOver may or may not occur due to test speed)
  • Match Mouse Down with Mouse Up
  • Remove artificial delays

⚠️ DO NOT MERGE: The updated tests are being forced to run 100 times each to demonstrate stability in CI

* Make sure to start a drag/drop operation on DragEnter
* Match Mouse Down with Mouse Up
* Remove artificial delays
@ghost ghost assigned sharwell Mar 15, 2023
@@ -120,7 +120,7 @@ public async Task Button_AchorNone_NoResizeOnWindowSizeWiderAsync()
form,
inputSimulator => inputSimulator.Mouse
.LeftButtonDown()
.MoveMouseBy(form.DisplayRectangle.Width, 0)
.DragMouseBy(form.DisplayRectangle.Width, 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to get this working with MoveMouseTo but send virtual coordinates here.

@@ -266,7 +263,7 @@ public async Task Button_Mouse_Press_With_Drag_Off_Button_Does_Not_Cause_Button_
form,
inputSimulator => inputSimulator.Mouse
.LeftButtonDown()
.MoveMouseTo(virtualPoint.X, virtualPoint.Y)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you see MoveMouseTo was also problematic?

@dotnet dotnet deleted a comment from azure-pipelines bot Mar 21, 2023
@sharwell sharwell force-pushed the fix-tests branch 2 times, most recently from fa43888 to fa9edb3 Compare March 21, 2023 13:40
@sharwell sharwell closed this Apr 13, 2023
@ghost ghost locked as resolved and limited conversation to collaborators May 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
draft draft PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants