lettuce
lettuce copied to clipboard
Feature Tags -- not always applied
@login
Feature: I want to be able to login
Scenario: Logging in as admin
Given I am on the login page
When I login as an administrator
Then I should be on the dashboard page
Scenario: Logging in as reviewer
Given I am on the login page
When I login as a reviewer
Then I should be on the dashboard page
lettuce -t login
will only run the first scenario.
@login
Feature: I want to be able to login
@foo
Scenario: Logging in as admin
Given I am on the login page
When I login as an administrator
Then I should be on the dashboard page
@foo
Scenario: Logging in as reviewer
Given I am on the login page
When I login as a reviewer
Then I should be on the dashboard page
lettuce -t login
will run both scenarios.
So the scenarios themselves seem to require tags for the feature tag to work. But that is just in this case at least.
@eyston We haven't been able to get tags to match at all. See #274. I have tried using your exact tags with our scenarios and no scenarios ever fire. Or conversly, if I tell lettuce to exclude with lettuce -t -login
, all of the scenarios fire.
An interesting observation that I see as I try to recreate the bug is:
- If feature is tagged, while scenarios are not tagged - zero scenario under the feature is detected/passed
- If feature is tagged, while one of the scenarios is tagged - all scenarios under the feature are detected/passed
Interesting to know if this is fixed with the new parser (#429). Can you turn this into a test case and put it in a pull request?
Apparently, this issue was fixed by this commit: https://github.com/gabrielfalcao/lettuce/commit/503fe2d2599290c45b021d6c424ab5ea899e42be
And it can no longer be reproduced in version 0.2.20