Autocompletion with Cypress.io in IntelliJ IDEA -- How?

Any recommendations on getting autocompletion working in IntelliJ IDEA for the Cypress SDK?

Docs on Cypress.io are not sufficiently detailed for me.

1
10 comments
Avatar
Permanently deleted user

In case this goes nowhere, Visual Studio Code is working for me.  Installed from the command line using `brew install visual-studio-code`.

-2

Works fine for me - cypress methods are resolved and avaiolable in completion:

 

Is node_modules/cypress/types folder included in index? make sure it's not excluded from project

2
Avatar
Permanently deleted user

TY!  Newb to IDEA.  Is this under File -> Project Settings -> Libraries ?  Elsewhere?  What's the exact path you're using in your IDE?

0

No, it's your project path. You need to open this folder in the Project tool window and make sure that it's not marked excluded (excluded folders usually have orange color, indexed ones are grey - if the default theme is used):

1
Avatar
Permanently deleted user

Got it.  Seems my structure indicates a non TypeScrpt file.  Otherwise, they're part of the indexed files for the project, but IntelliSense does not work.  I'm using the latest CE edition.  You?  Maybe you have a plugin loaded to handle TypeScript?

0

IDEA Comminity Edition provides no support for TypeScript and Javascript. You can't expect the completion to work there. Please consider purchaising IDEA Ultimate or WebStorm

1
Avatar
Permanently deleted user

When I mark the "Types" folder as not excluded (grey) it includes these files in my project, therefore when I full-text search my project I also get results from this folder as a side effect. Any idea how to avoid this?

0

you need choosing a search scope this folder is not included in... No other ways exist

1

Elena Pogorelova

I'm using WebSotrm 2020.1 and cannot get rid of the undefined errors for my Cypress testss

I have:

  • made sure node_modules/cypress was included in the project
  • added the recommended tsconfig.json to my cypress folder, with the compilerOptions.types set to ["cypress"]
  • added a triple-slash directive to my test file  /// <reference types="Cypress" />
  • installed the cypress plugin

I am simultaneously getting a hover-over on all the global symbols saying the variable is both undefined, but also seeing the expanded help and information, along with a reference to the ts file it is coming from.

 

0

The error comes from ESLint, as far as I can see; you can try a workaround from https://github.com/cypress-io/cypress/issues/3100#issuecomment-452719732 to get rid of it

1

Please sign in to leave a comment.