Skip to content
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

Extending the supported functionality of the VisualStudio IntegrationTest Utilities and adding the start of 'CSharpAutomaticBraceCompletion' #11223

Merged
merged 3 commits into from
May 12, 2016

Conversation

tannergooding
Copy link
Member

FYI. @jasonmalinowski, @dotnet/roslyn-infrastructure


private void VerifyEditorTextBeforeCursor(string expectedText) => VerifyEditorTextBeforeAndAfterCursor(expectedText, string.Empty);

private void VerifyEditorTextContains(string expectedText)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see the xUnit primitives being used directly; otherwise it just feels like we're porting our actions in a strange way. Put another way, this adds a layer of indirection which doesn't simplify anything and just increases concept count.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@jasonmalinowski
Copy link
Member

Also for review: @dotnet/roslyn-ide.

@@ -108,6 +108,7 @@
<InternalsVisibleToTest Include="Roslyn.Test.Utilities.Desktop" />
<InternalsVisibleToTest Include="Roslyn.VisualStudio.CSharp.UnitTests" />
<InternalsVisibleToTest Include="Roslyn.VisualStudio.Services.UnitTests" />
<InternalsVisibleToTest Include="Roslyn.VisualStudio.Test.Utilities" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? This seems very fishy.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EditorCompletionOptions.UseSuggestionMode is not available otherwise.

@jasonmalinowski
Copy link
Member

Most nitpicks, but I do have significant concerns about some of the waits I see. I would propose that any time we have a "wait for idle" of any kind we clearly state the exact mechanism in VS that we waiting for, ideally with a pointer to the code if we can do so. (I'd even push for mentioning file names if that's OK.) My worry is that much of integration test flakiness comes from poorly understood dependencies, and I'd like to ensure that when reimplementing this we understand it to the best of our ability.

@tannergooding
Copy link
Member Author

@jasonmalinowski, I believe I have now replied to all feedback so far and updated things appropriately.

public InteractiveWindowWrapper(IInteractiveWindow interactiveWindow)
public static InteractiveWindowWrapper CreateForCSharp()
{
var interactiveWindow =RemotingHelper.CSharpInteractiveWindow;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline? (strange spacing in any case)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

User32.SendInput(1, inputs, User32.SizeOf_INPUT);
}

private void SendKeyUp(ushort vk)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Share code with method above since it's identical except for dwFlags?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@jasonmalinowski
Copy link
Member

@tannergooding: did you miss a final push? https://github.com/dotnet/roslyn/pull/11223/files#r62754598 was commented as removed but wasn't.

Let's fix the use completion mode command invocation, and then call this good.

@tannergooding
Copy link
Member Author

@jasonmalinowski, no, the comment just didn't get updated (for some reason). There is a TestHook (TestHookPartialSolutionsDisabled) that is unavailable otherwise.

@tannergooding
Copy link
Member Author

Also, I will update to use the completion mode command invocation and update (sometime after lunch).

@tannergooding
Copy link
Member Author

@jasonmalinowski, updated.

…Test Utilities and adding the start of 'CSharpAutomaticBraceCompletion'
@tannergooding
Copy link
Member Author

@jasonmalinowski, I added a second commit which ensures all DTE calls are wrapped in IntegrationHelper.RetryRpcCall, it improves stability in the case of the call failing due RPC_E_CALL_REJECTED

… tend to fail with `RPC_E_CALL_REJECTED`.
_editorWindow.PlaceCursor("// Marker");

await _editorWindow.TypeTextAsync("void Foo(");
await _editorWindow.TypeTextAsync("\u001B"); // ESC
Copy link
Member

@jasonmalinowski jasonmalinowski May 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: constant please, or support the {ESC} syntax like everybody will expect.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Added the full set of constants previously available.

@jasonmalinowski
Copy link
Member

A couple requests for constants, one comment for style, and one bug where your error string isn't what you think it is. Otherwise 👍.

@tannergooding tannergooding merged commit 1b72147 into dotnet:master May 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants