Skip to content
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

cypress open "not" tagging terminating feature file at "not" tagged scenario #659

Closed
sKavanaghV opened this issue Jan 7, 2022 · 1 comment

Comments

@sKavanaghV
Copy link

Thank you for this great pre-processor. Had been running a much older version and now experimenting with the latest. Its not clear to me if this is Cypress issue, user issue or a pre-processor issue.

Current behavior

In a feature file, If a scenario is tagged with a tag that is part of a "not" via TAGS directive, any scenario after that one will not execute, and it appears that the affected scenario hangs.

Desired behavior

A scenario tagged with a "not ... " should be skipped and the feature file should continue to execute.

Test code to reproduce

For a cypress launch such as cypress open --env TAGS='not @demo'

And feature file...

@smoke
Feature: Not tags skipping stall

  Scenario: I will not be excluded
    Given the test delays for "1" seconds for I will not be excluded

  @staging
  Scenario: I also will not be excluded
    Given the test delays for "1" seconds for I will also not be excluded

  @demo
  Scenario: I should be excluded
    Given the test delays for "1" seconds for I should be excluded

  Scenario: I am last and should not be excluded
    Given the test delays for "1" seconds for I am last and should not be excluded

Cypress runner stops the feature file at the scenario that should be excluded; "I am last and should not be excluded" is never executed.

image

If I run it like cypress run --headless --browser chrome --spec \"cypress/integration/impact_embedded/clinician_features/enrollment/aTest.feature\" --env TAGS='not @demo'

It behaves the same, and appears to hang...

  Running:  impact_embedded/clinician_features/enrollment/aTest.feature                     (1 of 1)
[cypress-log-to-output] Attempting to connect to Chrome Debugging Protocol
[cypress-log-to-output] Connected to Chrome Debugging Protocol


  Not tags skipping stall
    ✓ I will not be excluded (1326ms)
    ✓ I also will not be excluded (1036ms)
    - I should be excluded

Lastly, if I try
./node_modules/.bin/cypress-tags run --browser chrome -g \"cypress/integration/impact_embedded/clinician_features/enrollment/aTest.feature\" --env TAGS='not @demo'

It behaves the same, and appears to hang...

  Running:  impact_embedded/clinician_features/enrollment/aTest.feature                     (1 of 1)
[cypress-log-to-output] Attempting to connect to Chrome Debugging Protocol
[cypress-log-to-output] Connected to Chrome Debugging Protocol


  Not tags skipping stall
    ✓ I will not be excluded (1349ms)
    ✓ I also will not be excluded (1057ms)
    - I should be excluded

Versions

  • Cypress version: 9.2.0
  • Preprocessor version: 4.3.1
  • Node version: 16.13.1
@badeball
Copy link
Owner

Due to personal reasons, the previous maintainers of this package are stepping down and handing the reigns over to me, a long-time contributor to the project and a user of it myself. This is a responsibility I'm very excited about. Furthermore, I'd like to thank @lgandecki ++ for all the work that they've done so far.

Read more about the transfer of ownership here.

The repository has however moved and all outstanding issues are being closed. This is not a reflection of the perceived importance of your reported issue. However, if after upgrading to the new version, you still find there to be an issue, feel free to open up another ticket or comment below. Please make sure to read CONTRIBUTING.md before doing so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants