optional text in cucumber expression does not match
See original GitHub issueCurrent 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
Step implementation missing for “I am on the start page”.
(However, it does match Then I am on the start page again
.)
Versions
- Cypress: 10.3.1
- Preprocessor: 12.0.0
- Node: 14.17.0
Checklist
- I’ve read the FAQ.
- I’ve read Instructions for logging issues.
- I’m not using
cypress-cucumber-preprocessor@4.3.1
(package name has changed and it is no longer the most recent version, see #689).
Issue Analytics
- State:
- Created a year ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Cucumber Expressions (JS): Optionals at end of line do not ...
Cucumber Expressions (JS): Optionals at end of line do not match steps when other transformations are involved in the step definition #403.
Read more >Cucumber 4 Optional Words? - java - Stack Overflow
X to 5.X absence of optional text in gherkin step caused that method argument got null value. Now I'm getting error IllegalArgumentException: ...
Read more >Cucumber Expressions - Cucumber Documentation
The Cucumber Expressions Docs have been moved to GitHub. You can help us improve this documentation. Edit this page. Explore SmartBear Tools.
Read more >[Cucumber] cucumber expressions; capture optional text or ...
In trying to do so, I get some problems I have to resolve. One is that cucumber expression syntax does not mix with...
Read more >Complete Course of Cucumber for Java: Optional ... - YouTube
... Complete Course (Tutorial) of Cucumber for #Java I introduce the concepts of Optional text, alt. ... Your browser can 't play this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
any
withunknown
and require each dev to explicitly state each expected type, although it’s not going to give you any runtime guarantees.Sure, like this