Common steps feature is not working
See original GitHub issueCurrent behavior
I have downloaded the project of Alapan, from the following link: https://github.com/alapanme/Cypress-Automation I executed “login.feature” test scenario and is working fine.
I have added a common folder under the e2e folder and inside that I have add a common.js file. Inside common.js, I have import cucumber and added the first step from the scenario (meaning that this step does not exist anymore at login.js)
Executing the scenario again, this is what I get:
Desired behavior
This should be working, as it was working before Cypress 10
Test code to reproduce
Versions
- Cypress version: 10.2.0
- Preprocessor version: 11.0.0
- Node version: 16.15.1
Checklist
- I’ve read the FAQ.
- I’ve read Instructions for logging issues.
- I’m not using
cypress-cucumber-preprocessor@4.3.1
(package name has changed and it is no longer the most recent version, see #689).
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Cucumber: Unable to find step definition - Stack Overflow
It looks like Cucumber isn't finding your step defintion class. In your unit test class you say: glue = {"com.macro.definition"}.
Read more >Feature file in different directory gives missing step ... - GitHub
So it seems if feature files are not in the default cypress folder then step files can not be located away from the...
Read more >4 - Cucumber Feature File mapping with Step Definition
CucumberBDD #BDD #NaveenAutomationLabsIn this video, I have explained how to map feature file steps with step definition methods in step ...
Read more >Step Organization - Cucumber Documentation
How Cucumber finds your features and step definitions. Be aware that, regardless of the directory structure employed, Cucumber effectively flattens the features ......
Read more >Background in Cucumber - Tools QA
Working example of background with Hooks in Cucumber Java. ... step or series of steps that are common to all the tests in...
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 Free
Top 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
@uaru I have below snippet on my
package.json
. My common step definitions are undercypress/e2e/common/
folder and feature specific steps are under sub folder oncypress/e2e/features/
.I might be able to help if you provide me a reproducible example, IE. a Git repo.