Support for option parameters? Eg Given("when (nothing|one thing|many things) have been added to the cart") #307
-
Hi, In the specflow there uses to be an option to limit the "word" input to a subset of possible inputs. My question is that is that supported in Reqnroll? If so how can I use it? Because the specflow syntax doesn't work. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Reqnroll now uses Cucumber Expressions by default for the format of the string argument of the step binding attributes. Since you want to use a regex expression, modify your binding expression to: "^when (nothing|one thing|many things) have been added to the cart$". This will force Reqnroll to treat the expression as a Regex. Look at the Cucumber Expression documentation for more information. |
Beta Was this translation helpful? Give feedback.
-
@Mohsens22 See discussion at #238. Based on that @olegKoshmeliuk has made the interface to override the behavior per-project (to support legacy / migration cases). Could you please try if overriding that integrace and implementing the more SpecFlow-compatibility handling way of regex groups would work for you? If yes, we could add it as a sample solution to https://docs.reqnroll.net/latest/guides/how-to-configure-cucumber-expression-behavior.html |
Beta Was this translation helpful? Give feedback.
Reqnroll now uses Cucumber Expressions by default for the format of the string argument of the step binding attributes.
Since you want to use a regex expression, modify your binding expression to: "^when (nothing|one thing|many things) have been added to the cart$". This will force Reqnroll to treat the expression as a Regex.
Look at the Cucumber Expression documentation for more information.