Add Integration tests for Inheritance margin#62047
Merged
Cosifne merged 12 commits intodotnet:mainfrom Jun 27, 2022
Merged
Conversation
davidwengier
approved these changes
Jun 21, 2022
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
suggested changes
Jun 21, 2022
Contributor
sharwell
left a comment
There was a problem hiding this comment.
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.
Contributor
|
Rewrote portions of this:
|
sharwell
approved these changes
Jun 21, 2022
Cosifne
commented
Jun 22, 2022
| } | ||
| 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); |
Member
Author
There was a problem hiding this comment.
@sharwell could you give a brief explanation of these magic numbers?
Contributor
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.