Suggestion: Alternatives expressions
Following the #144 proposition, discussed here the feasibility and the need for Alternative expressions feature.
Description
A less common feature is the ability to offer alternatives in the step text.
I have {int} cucumber(s) in my belly/stomach
This would match either of those texts:
I have 1 cucumber in my belly
I have 1 cucumber in my stomach
I have 42 cucumbers in my stomach
I have 42 cucumbers in my belly
References
https://github.com/cucumber/cucumber-expressions?tab=readme-ov-file#optional-text https://docs.specflow.org/projects/specflow/en/latest/Bindings/Cucumber-Expressions.html#optionals-alternatives
I reed some docs but I don't find a use case to understand this feature.
It's usable only with expression like {int} ?
Or a step like Given Developper on public/private projects is a good example ?
Yep, your last example could work. But in general, it is for when you want to use a synonym. In your example, it is an antonym, I suppose it can work in some contexts.
I do not have a great example as I do not use this feature. Like I said, if someome needs this feature, he can share a viable example so we can work on that.