-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Question] How to enable custom commands autocompletion ? #50
Comments
Hi @tianalemesle! The most preferred way to get autocompletion is to use TypeScript definitions for the commands.
I will probably rework the UI to make it easier to select the definition file. |
I see, however, I'm not using TypeScript at all... |
You probably do not need to add any support for TypeScript into your project. |
Hi @tianalemesle! BTW, I just realized that the current version of the plugin should suggest autocompletion for a command without a type definition. But this is for code inside a java script file only (not a ts one). |
If that TypeScript file needs to be located in the project directory, then I won't. Yes, I realized autocompletion actually works. However, I still get the |
I'll look if this could be fixed. |
How can the command be autocompleted but not highlighted ? |
What do you mean by 'not highlighted'? |
Aliases and custom methods are not the same things and are handled differentially. |
But, if I press |
It's just because the plugin adds a reference to the declaration. That being said, it requires a lot of work and I'm not sure if this feature is in demand enough. |
BTW, can you explain why it's not possible to add a single TS file inside your project? |
Because I'm the only one among my coworkers who uses your plugin and will subscribe. |
There are should be really a lot of coworkers to fund this feature development. |
I don't think it will, the reason is, we're collaborating on a project, which uses Cypress for tests, and I can't throw a file on the repo that is useless to everyone but me. |
This file structures your tests and makes them more robust and clean. So I would say that this file is useful for anyone who look into the tests. |
There are may be many reasons for that. |
|
|
Hi @mbolotov came here from youtube :) |
Hi @rnovosad! |
@mbolotov thanks for looking. can you please explain how can I get to this menu option to disable a tick? |
Oh, sorry, I just forgot to mention it. |
thanks @mbolotov it worked! still would be great to have it fixed in your implementation with fancy autocomplete options from cypress =) |
Hmm, seems I didn't get this point. Do you mean some functionality is not working after you disabled the option? |
Well, I'm not sure it's nice to have the same command duplicated in the suggestion list both as a type definition and as an implementation. |
I don't need it duplicated, but nice to have those nifty Cy icon at the method call |
Okay, I'll take a look at this, but I'm not sure if this is possible. |
I have multiple
Cypress.Commands.add
calls fromcypress/support/commands.js
, how do I enable autocompletion for those ?The
Add type for cypress custom command
intention is enabled but I can't find a way to trigger it.Thanks
The text was updated successfully, but these errors were encountered: