-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add Integration tests for Inheritance margin #62047
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
Add Integration tests for Inheritance margin #62047
Conversation
src/VisualStudio/IntegrationTest/New.IntegrationTests/CSharp/CSharpInheritanceMarginTests.cs
Outdated
Show resolved
Hide resolved
src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/EditorVerifierInProcess.cs
Outdated
Show resolved
Hide resolved
sharwell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a test for a UI layer, I can help update this today to use the mouse instead of bypassing the UI layer.
|
Rewrote portions of this:
|
| } | ||
| var horizontalResolution = NativeMethods.GetSystemMetrics(NativeMethods.SM_CXSCREEN); | ||
| var verticalResolution = NativeMethods.GetSystemMetrics(NativeMethods.SM_CYSCREEN); | ||
| var virtualPoint = new ScaleTransform(65535.0 / horizontalResolution, 65535.0 / verticalResolution).Transform(point); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sharwell could you give a brief explanation of these magic numbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current implementation won't work in multi-monitor configurations where the test VS instance is not on the primary display device. This isn't something we have to worry about in CI but hopefully we can fix it later by switching from MoveMouseTo to MoveMouseToPositionOnVirtualDesktop.
91eb839 to
f44920c
Compare
Tracking issue: #55714
Add 4 tests to cover the important scenarios of Inheritance margin.
There is one remaining thing for this test, right now I simulate the mouse click by creating a WPF event, and ideally, I feel it would be better to simulate the click by real moving the mouse.
I talked to Sam about this and the correct way seems to be to have a separate InputSimulator class to do that. And I feels it would be a separate PR work, even WPF event is not perfect, these tests should be good to prevent many regressions.