-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Deprecate And and But keywords #1787
Comments
My biggest issue with |
How would you avoid that coupling? Given a user named Carl
And feature toggle X is enabled
When Carl does a thing
Then something happened Being able to turn on a feature toggle implies the existence of some user. It could be rewritten as: Given feature toggle X is enabled for Carl
When Carl does a thing
Then something happened And implicitly create a user named Carl, but that gets complicated quickly. It's easier to enable the feature toggle for whom ever is the current acting user. |
I'm closing this. Technically it is possible to deprecate and eventually remove the keywords but I don't think it is worth the impact on existing projects nor is it worth the implementation effort. The suggested snippets already avoid the use of And and But so that should curb new usages. |
Summary
The
And
andBut
keywords are used as syntactic sugar in Gherkin. For example anAnd
step precedented by aGiven
step is itself aGiven
step. As such there is no need for lambdas and annotations forAnd
andBut
.Allowing step definitions to be written with
And
andBut
might result in the creation of that do do not either arrange, act or assert something.See: #1780
The text was updated successfully, but these errors were encountered: