You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regarding optional capturing groups in step definitions and parameter types, it seems that unmatched capturing group in step definition changed from undefined to null in cucumber-expressions-v7.0.1, when typescript was introduced. The previous preprocessor implementation was depending on cucumber-expressions ^6.0.1, while this is now on ^15.0.1, hence the change in behavior you're experiencing.
This is how cucumber-js now behaves and I see no reason for why the preprocessor should behave any differently.
I've relased v10.0.1 which omits logging certain calls to cy.wrap. Hope that helps.
You can use eg. patch-package if you want to change this behavior yourself (you will find the relevant lines in cucumber-expressions in dist/cjs/src/defineDefaultParameterTypes.js and dist/cjs/src/RegularExpression.js).
Current behavior
An argument with default value from the optional regex capturing group returns
null
instead of a default value.Given I have the following step definition:
When in my feature file I use:
I see the following in cypress test runner:
![screenshot-nimbusweb me-2022 05 22-18_39_59](https://user-images.githubusercontent.com/45420854/169706151-0f957b5b-fb7b-4d16-a4d8-b634c3ba78d1.png)
Desired behavior
I expect that for both steps cy.log will log
user
.At least this is how the old
cypress-cucumber-preprocessor
worked.Here's what I see when I use the old
![screenshot-nimbusweb me-2022 05 22-18_38_51](https://user-images.githubusercontent.com/45420854/169706147-8bed5049-a90f-4b3e-8901-60a68ea8e386.png)
cypress-cucumber-preprocessor
:Test code to reproduce
To reproduce:
npm i
npm run test
To compare
@badeball/cypress-cucumber-preprocessor
vs.cypress-cucumber-preprocessor
:old-preprocessor
branch and runnpm run test
again.Versions
The text was updated successfully, but these errors were encountered: