cucumber-expressions icon indicating copy to clipboard operation
cucumber-expressions copied to clipboard

Support wildcards in optional sequences

Open CLOVIS-AI opened this issue 1 year ago • 0 comments
trafficstars

🤔 What's the problem you're trying to solve?

We commonly have multiple variants of sentences with a few small differences. For example:

  • Declare "this thing"
  • Declare "this thing" as "that person"

✨ What's your proposed solution?

The ability to declare an expression "Declare {string}( as {string})". If the second value is not provided, a suitable language-specific default is provided to the parameter instead (e.g. null).

⛏ Have you considered any alternatives or workarounds?

  • Declaring two sentences: leads to some duplication, feels like cucumber-expression features don't interact neatly with each other

📚 Any additional context?

I'm using cucumber-java, but since there are no examples in this repository, I assume this feature is lacking here and it's not an implementation-specific problem.

CLOVIS-AI avatar Sep 02 '24 16:09 CLOVIS-AI