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

[🐛 Bug]: VSCode adds parentheses around methods during auto-completion #12591

Open
3 tasks done
k03mad opened this issue Mar 28, 2024 · 3 comments
Open
3 tasks done
Milestone

Comments

@k03mad
Copy link

k03mad commented Mar 28, 2024

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

8.35.0

Node.js Version

20

Mode

WDIO Testrunner

Which capabilities are you using?

{
    browserName: 'chrome'
}

What happened?

I have encountered strange behavior with auto-inserting unwanted parentheses around WDIO methods in VSCode.

Perhaps this is due to the way VSCode interprets types and doesn't recognize that this methods can be chained.
Or could it be a bug in the WDIO types?

Maybe someone has encountered such behavior and can give advice or a solution.

What is your expected behavior?

No response

How to reproduce the bug.

Repo to reproduce: https://github.com/k03mad/wdio-reproduce-autocomplete
Created with the default npm init wdio@latest .

Reproduced in both GitHub Codespaces and local VSCode installations.
Please refer to the GIF below.

Relevant log output

File: wdio-reproduce-autocomplete/test/pageobjects/login.page.js

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues
@k03mad k03mad added Bug 🐛 Needs Triaging ⏳ No one has looked into the issue yet labels Mar 28, 2024
@christian-bromann christian-bromann removed the Needs Triaging ⏳ No one has looked into the issue yet label Mar 28, 2024
@christian-bromann christian-bromann added this to the v9 milestone Mar 28, 2024
@christian-bromann
Copy link
Member

@k03mad thanks for raising the issue. This is a know problem. I had some ideas how we might be able to resolve this for v9.

@SimonRazor
Copy link

@k03mad if it helps I disabled these settings in VSCode and it's better than having to remove the brackets every time
image

@k03mad
Copy link
Author

k03mad commented Apr 15, 2024

@k03mad if it helps I disabled these settings in VSCode and it's better than having to remove the brackets every time

Wait... But the first option disables the suggestions entirely :)
The second disabled option alone doesn't work to prevent extra parentheses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

3 participants