lettuce icon indicating copy to clipboard operation
lettuce copied to clipboard

Feature Tags -- not always applied

Open eyston opened this issue 11 years ago • 4 comments

@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 avatar Mar 06 '13 15:03 eyston

@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.

ivanvenosdel avatar Mar 25 '13 16:03 ivanvenosdel

An interesting observation that I see as I try to recreate the bug is:

  1. If feature is tagged, while scenarios are not tagged - zero scenario under the feature is detected/passed
  2. If feature is tagged, while one of the scenarios is tagged - all scenarios under the feature are detected/passed

kiawin avatar Dec 11 '13 12:12 kiawin

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?

danni avatar Feb 12 '14 12:02 danni

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

brusco avatar Oct 06 '14 20:10 brusco