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.

Requesting Enhancement for "Step_Definitions" location configuration in package.json to support glob patterns

See original GitHub issue

First of all I want to say that I really love the work you guys have done here. I would, however, like to propose a small tweak to allow the “steps_definitions” location configuration property, configurable in package.json to allow glob patterns. A potentially quick fix to make this happen would be to replace (in “index.js” at the root folder) if (loaded && loaded.config && loaded.config.step_definitions) { return path.resolve(appRoot, loaded.config.step_definitions); } with if (loaded && loaded.config && loaded.config.step_definitions) { return `${appRoot}/loaded.config.step_definitions`; } Getting rid of path.resolve, will allow the user to pass in a glob string without it ultimately resolving to something unintended (doesn’t say anywhere that glob patterns aren’t supported there yet).
I need this enhancement because i’m working on a project wherein all the step_definitions aren’t defined under one parent folder by design. This enhancement will give users more flexibility to structure their step_definition files as they see fit. I can currently achieve my ask by using the “fileServerFolder” configuration property configurable in “cypress.json” but the comment in the aforementioned “index.js” file says it is deprecated but left for backwards compatibility. Not sure if it is going to remain there longterm though. However, ideally, it would be awesome to have that functionality in the “step_definitions” configuration property.

Thanks! I really appreciate your efforts so far!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Huffman17commented, Apr 3, 2019

I am having a similar issue, I am trying to separate features from step_definitions so in my package.json : "cypress-cucumber-preprocessor": { "step_definitions": "./cypress/integration/project/stepdefinitions/" }

and my file path for features is cypress/integration/project/features/file.feature

When I run the feature, it cannot find my step definitions.

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

Requesting Enhancement for "Step_Definitions" location ...
Requesting Enhancement for "Step_Definitions" location configuration in package.json to support glob patterns #70.
Read more >
We've tried to resolve your step definitions at src/integration ...
Your feature files should not be in a separate folder. They should be where you specified in your package.json at stepDefinitions.
Read more >
SAP API Management
SAP API Management lets you publish, promote, and oversee APIs in a secure and scalable environment. Environment. This service runs in the ...
Read more >
Releases - CodeceptJS
Requires Playwright >= 1.18; Added support to codecept.config.js for name consistency ... Fixed codeceptjs gt command to respect config pattern for tests.
Read more >
SpecFlow+ LivingDoc - SpecFlow's documentation
TestExecution.json will be generated in the test assembly folder of your ... Glob patterns are only supported when you use a relative path ......
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