-
-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stepDefinitions issue #750
Comments
What is the purpose of |
I removed it. Was there by mistake. e2e/common should only hold common code step definitions |
@badeball I am facing the same issue while executing a specific feature. All Hooks (Before,beforeEach) are executed as the first step which is nowhere related to the selected feature file. |
This patch fixes it. diff --git a/cypress-cucumber-preprocessor.config.js b/cypress-cucumber-preprocessor.config.js
index 20c548d..c00dd4e 100644
--- a/cypress-cucumber-preprocessor.config.js
+++ b/cypress-cucumber-preprocessor.config.js
@@ -1,3 +1,3 @@
module.exports = {
- stepDefinitions: ['[filepath]/*.ts}', 'cypress/e2e/**/*.ts']
+ stepDefinitions: ['[filepart]/!(cypress.config).ts', 'cypress/e2e/common/**/*.ts']
}; |
@JomyGeo, you've misconfigured |
Well, in |
You're also misunderstanding entirely the purpose |
This means that the management.feature needs a step that is already defined in parent. This is not new stuff. It is also possible to have another directory inside management that uses steps from both management and public. We cannot have all steps define in common. |
Help me understand what you mean. What else would the pattern above include from my sample project. I checked with colleagues and they are having the same issues and unable to upgrade. What if you tweak my project and test it. I will share your insight with others in my org. Lastly, I tried DEBUG=cypress:* to see if I can find an expansion for the stepDefinitions but there was none. Is there a way to see it? Thank you. |
There's a debug statement mentioned in "Instructions for logging issues", linked in your original post. |
That's fine, but if you in |
Hi Thank you. |
Current behavior
I have a before() that has cy.login()
The login is run for every feature when only one feature is selected
Desired behavior
before() should only run for the selected feature
Test code to reproduce
https://github.com/aomaryus/stepDefintionsIssue
Versions
Checklist
cypress-cucumber-preprocessor@4.3.1
(package name has changed and it is no longer the most recent version, see #689).The text was updated successfully, but these errors were encountered: