question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change Default DIrectory for stepDefinitions

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
lgandeckicommented, Feb 22, 2020

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

0reactions
badeballcommented, Apr 10, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found