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.

10 comments
Comment actions Permalink

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

-2
Comment actions Permalink

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
Comment actions Permalink

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

0
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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

1
Comment actions Permalink

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
Comment actions Permalink

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.