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

Add E2E tests for diagnostic and formatting #522

Merged
merged 1 commit into from
Jul 12, 2024
Merged

Conversation

dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Jul 11, 2024

Summary

This PR adds end-to-end tests for diagnostics and formatting capability of the Ruff VS Code extension.

Resources

Test Plan

Run just e2e-test or npm run test

Preview:

Screen.Recording.2024-07-11.at.16.02.28.mov

@dhruvmanila dhruvmanila force-pushed the dhruv/e2e-test branch 2 times, most recently from edf26a5 to e271ba7 Compare July 11, 2024 10:31
@dhruvmanila dhruvmanila marked this pull request as ready for review July 11, 2024 10:33
@dhruvmanila
Copy link
Member Author

I think we might not want to include this in CI for now and only run it manually. This takes time because it requires loading VS Code, Ruff extension, initializing the language server.

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

I would find it worthwhile to spend 1-2h to figure out if we could port the CI workflow from the black extension. https://github.com/microsoft/vscode-black-formatter/blob/458ed8f03f03c6e021361b7dcf4a8c7ab7c3d5fb/.github/workflows/pr-check.yml#L91-L147 Not as part of this PR, but as a possible follow up

src/test/diagnostics.test.ts Outdated Show resolved Hide resolved
@@ -151,15 +151,14 @@ async function createNativeServer(
serverName: string,
outputChannel: LogOutputChannel,
initializationOptions: IInitializationOptions,
ruffBinaryPath?: string,
ruffVersion?: VersionInfo,
ruffExecutable?: RuffExecutable,
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@dhruvmanila
Copy link
Member Author

I would find it worthwhile to spend 1-2h to figure out if we could port the CI workflow from the black extension. microsoft/vscode-black-formatter@458ed8f/.github/workflows/pr-check.yml#L91-L147 Not as part of this PR, but as a possible follow up

Yeah, I'll look at it. I've one more reference (vscode-python extension) which I'll look at.

@dhruvmanila dhruvmanila merged commit f60bcc8 into main Jul 12, 2024
6 checks passed
@dhruvmanila dhruvmanila deleted the dhruv/e2e-test branch July 12, 2024 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants