-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
optional text in cucumber expression does not match #784
Comments
The docs are inaccurate, cucumber expressions are strings. |
Additionally, if you were to write a step |
So for But thanks for fixing the docs. Is |
Save your opinion of it for the authors. https://github.com/cucumber/cucumber-expressions And the rest of the docs look fine. |
Thank you. But their specification does not imply if my use case should work or not. Common sense tells me that it should. Sorry, but may I ask if it is their or your code we are talking about? Just to clarify.
Although I’m new to Typescript, I think one of those four statements must be wrong. |
|
So Ah, I guess “The examples in this section” just does not include the rest of the page (and in fact is only one example). |
That's right. |
The thing I do not understand is: Do you use some original cucumber code to parse those expressions? Something you cannot touch? Or do you just reject my let’s call it request for improvement? |
You can find multiple cucumber libs listed as dependencies in package.json, including @cucumber/cucumber-expressions. |
Thanks for your information! One last question, if I may: I am thinking about workarounds. Is it possible for me to transform the string before it goes to cucumber-expressions? I mean without needing to fork this project? To be more specific, I want to replace all " (" with "( " so that
|
Sure, like this
|
Thank you! My workaround now looks like this: (“Dann” is German for “Then”.)
Usage:
I wonder if I am losing anything by having |
No, I don't think so. It's not possible to infer the types of the args of a step-def-body statically. I might have replaced |
Good point! I replaced |
Current behavior
Omitted optional text in cucumber expressions do not match.
Expected behavior
Omitted optional text in cucumber expressions should match.
Test code to reproduce
I assume
'this is a cucumber epression'
as indicated in the preprocessor docs and defined in the cucumber docs.Then('I am on the start page (again)', () => {});
does not match
Then I am on the start page
(However, it does match
Then I am on the start page again
.)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: