-
-
Notifications
You must be signed in to change notification settings - Fork 690
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
Cucumber Expressions: Non Capture Group #131
Comments
Couldn't you just use regular string interpolation here? i.e.
|
In JavaScript and Ruby you could, @matt, but not in Java or C#. Further, it becomes cumbersome to use this consistently across different stepdef files. |
I've completed the changes for this, but I don't believe I have the right permissions to complete a pull request.
There was only one file changed for the code, and three tests were removed that tested the escaping of square brackets (however, they are now special characters in terms of cucumber-expressions). Is there a way for me to gain those permissions, or would you like me to just post the changes below? |
You have to fork the repo, clone your fork, create a branch for your change, push to your fork and then make a pull request. See https://help.github.com/articles/creating-a-pull-request-from-a-fork/ and https://help.github.com/articles/creating-a-pull-request/ for details. |
Closed due to inactivity |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
I'm linking to the issue that I created over in the cucumber-js repo here in order to trace back the whole conversation.
There are many cases in our step definitions where we have a varity of repeated groups that don't change the steps functionality, but does do quite a bit for readablilty in the feature files:
Given I fill in "Foo"
&And fill in "Bar"
Say that you are using these alternatives across a large set of step definitions and you wish to change them all. This is where the problem (and the solution) both appear.
Current way of completing the task
At current, we can do alternatives like so:
However, this does mean that we have a parameter that is never actually used in the step definition that we have and this is the only way of storing the list to be used in many differing steps.
Possible Solution
Perhaps square brackets could be used for things that don't need to be captured, but still require the transformation.
Another plus side, is that if the parameter needs to be captured, the only difference would be the brackets that you use in that step definition:
Context & Motivation
We will be working with cucumber on a wide variety of projects in our company and I can guarantee that many of them will require a large number of declaratively written step definitions that require many alternatives that won't be captured for use within the step definitions.
This would make it easier for us to keep track of all of the alternatives that we will be using, and will mean that we wont have to search through the many step definition files for all of the uses..
And I am certain that others in the cucumber community will be in the same situation as I.
The text was updated successfully, but these errors were encountered: