-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Tags with whitespace are deprecated and may be removed #600
Comments
Since Gherkin 4.9.0 tags with whitespace are deprecated: use a comma as an explicit OR operator. See - Behat/Gherkin#213 - Behat/Gherkin#215 - https://behat.org/en/latest/user_guide/context/hooks.html#tagged-hooks Closes jhedstrom#600
Can you clarify with an example where it is actually failing? There is a difference between tags that include whitespace, and a list of different tags that are separated by whitespace. Note the difference in the usage of the |
I just checked the reference implementation and having multiple tags on a single line separated by whitespace (e.g. See the examples using tags on https://github.com/cucumber/common/tree/main/gherkin |
Hi, thanks for your time!
For me, just having the mail context enabled and running a test is sufficient IIUC: as part of dispatching the before scenario hooks it ends up parsing the context's tag(s).
Yeah, and that tripped me for a while, as I couldn't find the tag with whitespace in it through visual inspection! It could be that the issue is with Gherkin, but certainly the Thanks again! |
You might be mixing up tag annotations on tests and the tag filter argument on the behat CLI.. only there tag operators for AND/OR/NOT make sense. |
I mean I just updated behat and gherkin, reran a test and it spat out a deprecation due to the mail context (: It looks like currently Behat uses the same class ( Although there is a slight difference in that it's possible to specify multiple arguments to the CLI with Interestlingly my read of cucumber (which the gherkin change was made to match) is that tag expressions can have spaces (and don't use symbols for logical operators), so I guess I'm really missing something. (: Thanks both! |
Yes, I'm not sure what's exactly going on, what I means is that |
I've just started running into this as well. I've hacked at the However I'm not clear on what the proper fix may be. In terms of avoiding the error, comma-separating the tags as well as putting each tag an a new line both work but I'm not sure which provides the intended behavior. I'm working around this for now by patching using the fix from #601. |
Since Gherkin 4.9.0 tags with whitespace are deprecated: use a comma as an explicit OR operator. See - Behat/Gherkin#213 - Behat/Gherkin#215 - https://behat.org/en/latest/user_guide/context/hooks.html#tagged-hooks Closes jhedstrom#600
Since Gherkin 4.9.0 tags with whitespace are deprecated: use a comma as an explicit OR operator. See - Behat/Gherkin#213 - Behat/Gherkin#215 - https://behat.org/en/latest/user_guide/context/hooks.html#tagged-hooks Closes jhedstrom#600
Since Gherkin 4.9.0 (issue, PR) tags with whitespace are deprecated, and I'm seeing failures due to
\Drupal\DrupalExtension\Context\MailContext
with@BeforeScenario @mail @email
(and the after scenario's the same).I can suppress deprecations with the following in
behat.yml
as an overly-broad bandaid:(Thanks to https://stackoverflow.com/a/31059663)
And I think the fix would just be to use a comma, which functions as an OR operator, see https://behat.org/en/latest/user_guide/context/hooks.html#tagged-hooks.
Thanks!
The text was updated successfully, but these errors were encountered: