-
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
Update NavigateTo tests to support AllInOneSearch #64582
Conversation
src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/ShellInProcess.cs
Show resolved
Hide resolved
src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/InputInProcess.cs
Show resolved
Hide resolved
src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/InputInProcess.cs
Show resolved
Hide resolved
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.
Ultimatly we might want to talk to platform team to find a good solution, but this would be an acceptable workaround for me right 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.
Some questions for possible cleanup but this is fine for getting things off the ground.
|
||
if (isAllInOneSearch) | ||
{ | ||
await telemetry.VerifyFiredAsync(new[] { "vs/ide/vbcs/navigateto/search", "vs/ide/search/completed" }, HangMitigatingCancellationToken); |
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.
Why are we even asserting telemetry events in the first place? Isn't this just asserting an implementation detail of the underlying dialog?
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.
Yeah, I didn't really think it was useful, but I was trying to preserve it. The other tests which drive the NavigateTo dialog do not check for these events.
src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/InputInProcess.cs
Show resolved
Hide resolved
|
||
await TestServices.Shell.ExecuteCommandAsync(VSConstants.VSStd12CmdID.NavigateTo, cancellationToken); | ||
|
||
return await WaitForNavigateToFocusAsync(cancellationToken); |
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.
Why have the local function here?
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.
Sometimes I like to name a bit of code to make it very clear what the code is trying to achieve. Of course I could do that with a comment as well.
cancellationToken.ThrowIfCancellationRequested(); | ||
|
||
// Take no direct action regarding activation, but assert the correct item already has focus | ||
TestServices.JoinableTaskFactory.Run(async () => |
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.
Why calling .Run() here since we're already in an async method?
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 borrowed this code from the InputInProcess.SendToNavigateToAsync. Will admit that I need to learn more about JTF generally. I guess we could move this into the method and add a transition off the main thread following the control check.
Resolves bullet 1 from #64545 (comment)