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

Make hover integration test pass #2050

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions test/integrationTests/hoverProvider.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,11 @@ namespace Test
}
}
}`;
let fileUri = await testAssetWorkspace.projects[0].addFileWithContents("test1.cs", program);

let fileUri = await testAssetWorkspace.projects[0].addFileWithContents("hover.cs", program);
await omnisharp.restart();
await omnisharp.waitForEmptyEventQueue();

await vscode.workspace.openTextDocument(fileUri);

await vscode.commands.executeCommand("vscode.open", fileUri);
Copy link

Choose a reason for hiding this comment

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

Why did you move away from the openTextDocument helper that you switched to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No specific reason. I just thought it would maintain consistency with the codeActionRename test. Is openTextDocument a better way ?

let c = await vscode.commands.executeCommand("vscode.executeHoverProvider", fileUri, new vscode.Position(10, 29));

let answer: string =
`Checks if object is tagged with the tag.

Expand All @@ -66,6 +62,7 @@ Parameters:
\t\ttagName: Name of the tag.

Returns true if object is tagged with tag.`;

expect(c[0].contents[0].value).to.equal(answer);
});

Expand Down