1

I have feature file written in gherkin and step definition written in javascript. I am using IntelliJ. I am not able to navigate to the step definition, it shows 'Undefined step reference'.

Is there any glue file needed in Cucumber for Javascript, similar to Cucumber in java. If so, how should i write it in javascript?

Pankaj
  • 52
  • 1
  • 8

1 Answers1

3

IntelliJ is a Java editor. Use WebStorm for Javascript, to jump to step definitions from features. Also make sure that your feature files are under features folder and step definitions are under step_definitions

nilesh
  • 14,131
  • 7
  • 65
  • 79
  • Thanks, Nilesh. Yes I used WebStorm and put all my steps definitions under "step_definitions" directory and it worked. – Pankaj Aug 15 '16 at 11:47
  • 1
    This is factually incorrect. IntelliJ IDEA has all of the features of WebStorm and also a bunch of other features for additional languages and frameworks. WebStorm is the collection of a subset of features supported by IntellIJ IDEA. https://stackoverflow.com/questions/13827214/can-intellij-idea-encapsulate-all-of-the-functionality-of-webstorm-and-phpstorm/13829907#13829907 – th3morg Jun 16 '17 at 17:31
  • If this was true, why would they sell different licenses? – nilesh Jun 16 '17 at 21:41
  • IntelliJ IDEA Ultimate has all of the features of WebStorm, PiCharm and a bunch of other IDE's. The seperate IDE's are cheaper, and more focussed. So if you only need JS and do not need Python or Java, then WebStorm is sufficient. If you do full stack many languages, IntelliJ Ultimate might be the better option – Endran Dec 01 '17 at 10:30
  • I have both IntelliJ IDEA ultimate and webstorm licensed versions, however I don't see option to run cucumberjs/mocha tests in IntelliJ run configurations, however I do see them in webstorm – nilesh Dec 01 '17 at 18:30