-
Notifications
You must be signed in to change notification settings - Fork 236
Fix rename integration test #12634
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 rename integration test #12634
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -212,6 +212,8 @@ await TestServices.SolutionExplorer.AddFileAsync(RazorProjectConstants.BlazorPro | |
|
|
||
| await TestServices.Editor.PlaceCaretAsync(position, ControlledHangMitigatingCancellationToken); | ||
|
|
||
| await Task.Delay(500); | ||
|
|
||
| // Act | ||
| await TestServices.Editor.InvokeRenameAsync(ControlledHangMitigatingCancellationToken); | ||
| TestServices.Input.Send("ZooperDooper{ENTER}"); | ||
|
|
@@ -337,16 +339,14 @@ public class MyComponent : ComponentBase | |
| await TestServices.RazorProjectSystem.WaitForComponentTagNameAsync(RazorProjectConstants.BlazorProjectName, "MyComponent", ControlledHangMitigatingCancellationToken); | ||
| await TestServices.Editor.WaitForComponentClassificationAsync(ControlledHangMitigatingCancellationToken); | ||
|
|
||
| await TestServices.SolutionExplorer.OpenFileAsync(RazorProjectConstants.BlazorProjectName, "MyComponent.cs", ControlledHangMitigatingCancellationToken); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Razor is already open, because of the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh, I didn't see the open parameter to AddFileAsync. Now it seems like the cs file's call to AddFileAsync should specify to not open the file, but it doesn't really matter. |
||
|
|
||
| await TestServices.Editor.PlaceCaretAsync(position, ControlledHangMitigatingCancellationToken); | ||
|
|
||
| // Act | ||
| await TestServices.Editor.InvokeRenameAsync(ControlledHangMitigatingCancellationToken); | ||
| TestServices.Input.Send("ZooperDooper{ENTER}"); | ||
|
|
||
| // Assert | ||
| await TestServices.Editor.VerifyTextContainsAsync("<ZooperDooper></ZooperDooper>", ControlledHangMitigatingCancellationToken); | ||
| await TestServices.Editor.WaitForTextContainsAsync("<ZooperDooper></ZooperDooper>", ControlledHangMitigatingCancellationToken); | ||
|
|
||
| await TestServices.SolutionExplorer.OpenFileAsync(RazorProjectConstants.BlazorProjectName, "MyComponent.cs", ControlledHangMitigatingCancellationToken); | ||
| await TestServices.Editor.VerifyTextContainsAsync("public class ZooperDooper : ComponentBase", ControlledHangMitigatingCancellationToken); | ||
|
|
||
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.
never a fan of blanket delays. Is there any way we can poll or do something else to determine things are good to go?
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 definitely worthy of follow up. Triggering a rename is just executing a VS command via DTE, so the only things we can probably wait for, that I'm aware of, are internal to Roslyn at the moment.