Change Default DIrectory for stepDefinitions
See original GitHub issueI had a problem finding my steps when I first upgraded to v2.0.1 because my cypress config is as follows:
{
"fixturesFolder": "test/cypress/fixtures",
"integrationFolder": "test/cypress/integration",
"pluginsFile": "test/cypress/plugins/index.js",
"screenshotsFolder": "test/cypress/screenshots",
"supportFile": "test/cypress/support/index.js",
"videosFolder": "test/cypress/videos"
}
I solved the problem adding this to my package.json:
"cypress-cucumber-preprocessor": {
"nonGlobalStepDefinitions": true,
"stepDefinitions": "test/cypress/integration",
}
I would love to see you change the default value for the step definition path to be the integrationFolder
configured in cypress.json. I seems like you should be able to change this line of code from this:
const relativePath = confStepDefinitions || "cypress/integration";
to this:
const relativePath = confStepDefinitions || Cypress.config('integrationFolder');
But when I try that locally, it tells me that Cypress
is not defined in the context where this code is executed. Is that why you’re not using it in the first place?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Change Default DIrectory for stepDefinitions · Issue #311
I would love to see you change the default value for the step definition path to be the integrationFolder configured in cypress.json.
Read more >how to define step definitions location for cucumber in ...
You can set the glue location globally by opening "Edit Configurations -> Defaults -> Cucumber Java -> Glue ...
Read more >Step Organization - Cucumber Documentation
How Cucumber finds your features and step definitions ... This is either the default case or the location specified with the. relevant. relevant....
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 >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 >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
Hmm I guess you could, but that’s a backward incompatible change. It might be worth introducing a major version bump for this change if this helps a lot of people
Due to personal reasons, the previous maintainers of this package are stepping down and handing the reigns over to me, a long-time contributor to the project and a user of it myself. This is a responsibility I’m very excited about. Furthermore, I’d like to thank @lgandecki ++ for all the work that they’ve done so far.
Read more about the transfer of ownership here.
The repository has however moved and all outstanding issues are being closed. This is not a reflection of the perceived importance of your reported issue. However, if after upgrading to the new version, you still find there to be an issue, feel free to open up another ticket or comment below. Please make sure to read CONTRIBUTING.md before doing so.