Closed LeohsPaixao closed 4 weeks ago
This could very well be intended behavior, depending on your configuration and file hierarchy, like if each feature is paired with every file containing hooks & step definitions.
In any case, you need to provide a complete & runnable example illustrating the issue.
Unfortunately, I can't show you the code anymore as it's from a company project. Regarding the file hierarchy, the specs are separated by modules and each one has its own 'BeforeAll', i.e. there is no dependency between them. But basically, all the BeforeAlls for each spec are the same, doing practically the same thing, as in the code I sent above.
"cypress-cucumber-preprocessor": {
"nonGlobalStepDefinitions": false,
"stepDefinitions": "./e2e/specs/**/**/step_definitions/**/*.spec.ts",
"html": {
"enabled": true
}
This could very well be intended behavior, depending on your configuration and file hierarchy, like if each feature is paired with every file containing hooks & step definitions.
In any case, you need to provide a complete & runnable example illustrating the issue.
Oooooh, I understood.
Current behavior
'BeforeAll' of all other specs is running on a specific spec, where it contains only one 'BeforeAll'.
Desired behavior
Only the 'BeforeAll' of the specified spec runs in the tests.
Test code to reproduce
Versions
Checklist
cypress-cucumber-preprocessor@4.3.1
(package name has changed and it is no longer the most recent version, see #689).