forked from Klaveness-Digital/cypress-cucumber-preprocessor
-
-
Notifications
You must be signed in to change notification settings - Fork 151
Filtered specs affect common ancestor path #785
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
Comments
badeball
added a commit
that referenced
this issue
Aug 2, 2022
badeball
added a commit
that referenced
this issue
Aug 8, 2022
The value that is sometimes mutated by addCucumberPreprocessorPlugin(), is read by compile() as it attempts to calculate a common ancestor path of all the files. It would erroneously use the filtered specs to determine this value and this obviously adversely affected the ability to resolve step definitions. This fixes #785.
badeball
added a commit
that referenced
this issue
Aug 8, 2022
The value that is sometimes mutated by addCucumberPreprocessorPlugin(), is read by compile() as it attempts to calculate a common ancestor path of all the files. It would erroneously use the filtered specs to determine this value and this obviously adversely affected the ability to resolve step definitions. This fixes #785.
This has been fixed in v12.0.1. |
Closed
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For Cypress v10 and higher, a common ancestor path (CAP) is calculated for all spec files and used as an implicit integration folder. This implicit folder is removed from the absolute path of all spec files and the result is used as replacement values in
stepDefinitions
.IE. given the following spec files
and
stepDefinitions: "cypress/e2e/[filepath].ts"
, then we'd have a CAP ofcypress/e2e
. Forcypress/e2e/foo/bar.feature
, we'd remove it and the extension and be left withfoo/bar
, this is what's used for[filepath]
.The CAP is calculated inside
template.ts
, which is implicitly invoked by EG.esbuild.ts
. It however, will typically be invoked afteraddCucumberPreprocessorPlugin(..)
has had a chance to mutate the config object. This may affect the ability to calculate a proper CAP, as we're now basing it on a subset of the spec files.The text was updated successfully, but these errors were encountered: