-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 VSI tests for Navigation Bars #18478
Conversation
int Foo() { } | ||
void Bar() { } | ||
}"); | ||
VisualStudio.Editor.PlaceCaret("this", charsOffset: 1); |
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.
Did something happen to SetUpEditor?
}"); | ||
VisualStudio.Editor.PlaceCaret("this", charsOffset: 1); | ||
VisualStudio.Workspace.WaitForAsyncOperations(FeatureAttribute.NavigationBar); | ||
VisualStudio.Editor.ExpandRightNavBar(); |
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.
Stupid question, but shouldn't expanding the nav bar block until it's ready anyway?
VisualStudio.Editor.SelectRightNavBarItem("operator !=(C c1, C c2)"); | ||
VisualStudio.Workspace.WaitForAsyncOperations(FeatureAttribute.NavigationBar); | ||
|
||
VisualStudio.Editor.Verify.CaretPosition(205); |
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.
I think you can do VerifyCurrentLine and include a $$ to denote the caret position instead of setting a huge incomprehensible number.
} | ||
|
||
[Fact, Trait(Traits.Feature, Traits.Features.NavigationBar)] | ||
public void VerifyNavBar() |
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.
This one test tests a lot of stuff.
@@ -0,0 +1,147 @@ | |||
using System; |
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.
Copyright
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.
And maybe unused usings?
} | ||
|
||
ExpandNavigationBar(comboboxIndex); | ||
System.Windows.Forms.SendKeys.SendWait("{HOME}"); |
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.
Is this how we have to SendKeys now?
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.
} | ||
|
||
var topMarginControl = control.GetPropertyValue<ContentControl>("TopMarginControl"); | ||
UIElement vsDropDownBarAdapterMargin = topMarginControl.Content as UIElement; |
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.
var
} | ||
} | ||
|
||
static class Extensions |
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.
explicit accessibility
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.
better name? These are a bunch of reflection helpers, so maybe ReflectionExtensions? Or just ReflectionHelpers without the extension method part.
@@ -169,5 +169,44 @@ public void WaitForActiveView(string viewName) | |||
|
|||
public string[] GetErrorTags() | |||
=> _editorInProc.GetErrorTags(); | |||
|
|||
public void ExpandProjectNavBar() |
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.
This is our opportunity to call them something better than "Project/Left/Right" here, since the "Left/Right" part is named that way for legacy reasons, and "Left" actually means "Middle". Project/Type/Member?
Thanks @dpoeschl. I've incorporated your feedback. |
retest windows_release_vs-integration_prtest |
retest windows_debug_vs-integration_prtest |
retest windows_release_vs-integration_prtest |
Tag @dotnet/roslyn-ide for review