Webstorm doesn't recognize step definitions
See original GitHub issueI don’t really know if I should ask this here, but Webstorm doesn’t recoginize the step definitions of this plugin because the steps are given, when, then. Webstorm does recognize the official cucumber package’s Given, When an Then (capitalized). Webstorm recognizing step definitions is extremely helpful in preventing duplicate step definitions.
// Recognized (like the official cucumber package)
Given(`I am on the webpage`, () => {
cy.visit(url);
});
// Not recognized (like this plugin)
given('I am on the webpage', () => {
cy.visit(url);
});
I did find a workaround, but I’d rather not have people forget to include this:
// Just add this above the step definitions
const Given = given;
const When = when;
const Then = then;
Is there a way this could be solved without a workaround?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:23 (11 by maintainers)
Top Results From Across the Web
Cucumber with IntelliJ not finding step definitions
I finally found the solution to my question. The error was caused by a plugin called Substep IntelliJ Plugin. You need to search...
Read more >Steps cannot reach the step definitions if they are out of ...
The problem is when I write some step def in that folder the feature steps are unable to navigate to step def but...
Read more >Webstorm doesn't recognize step definitions · Issue #56 - GitHub
Webstorm recognizing step definitions is extremely helpful in preventing duplicate step definitions. ... I did find a workaround, but I'd rather ...
Read more >cucumber fails to find the step definitions in IntelliJ IDEA
Undefined scenarios | cucumber fails to find the step definitions in IntelliJ IDEA. 27K views 2 years ago.
Read more >FAQ - Cucumber Documentation
In this instance, you need to configure a new run configuration in IntelliJ IDEA. ... If IntelliJ IDEA doesn't recognize the package with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lgandecki
I will change my PR and check if the build works when I do the
const Given = given
stuff.@vadimromanyak You can also use ticks:
If you check out the test steps I created (webstormSupport.steps.js) you can see I use either the ticks or /^…?/:
By the way, we can’t really test Webstorm support itself I guess, only that the capitalized version is working correctly within the plugin.
https://youtrack.jetbrains.com/issue/WEB-32819 for follow-up. You can “thumb-up” to make it gain interest, and/or watch the issues for updates.