Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In WebStorm, can't navigate from .feature file to step definitions in a nonstandard directory

WebStorm doesn't navigate from a .feature file to the function declaration in stepDefinition.js if the name of the folder is stepDefinitions. It works fine if the folder name is step_definitions.

Is there a setting in WebStorm that I can change so that it will look for step definitions JS files under stepDefinitions and not step_definitions?

I am talking about this feature: https://www.jetbrains.com/help/idea/15.0/navigating-from-feature-file-to-step-definition.html?origin=old_help

I would like to stick to the programming standards we have established. Thanks.

like image 544
Kapil Chokhawala Avatar asked Feb 07 '23 11:02

Kapil Chokhawala


1 Answers

No, WebStorm can't be configured to look for Cucumber step definitions in a folder other than step_definitions. An issue is filed with JetBrains and it has not been fixed yet. You can vote for it to encourage JetBrains to fix it.

That issue mentions a workaround, which is to make a symlink from your non-standard step definition folder to the standard one.

like image 183
Dave Schweisguth Avatar answered Apr 06 '23 21:04

Dave Schweisguth