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

Support suite-level test configuration via Feature tags #1158

Closed
3 tasks done
mallison opened this issue Feb 19, 2024 · 3 comments
Closed
3 tasks done

Support suite-level test configuration via Feature tags #1158

mallison opened this issue Feb 19, 2024 · 3 comments

Comments

@mallison
Copy link
Contributor

Current behavior

Suite-level configuration, eg testIsolation, cannot be applied using tags.

Eg.

@testIsolation(false)
Feature: Apply Feature tags at the suite level

    Scenario: Open a page
        Given I load a page

    Scenario: the page still exists
        Then the page should exist

Does not work.

Desired behavior

Tags set on a Feature get applied to the corresponding describe so that suite-level configuration can be altered.

Test code to reproduce

I've created a small repository with a single feature file to demonstrate the issue https://github.com/marvelapp/suite-level-tags

In this repo when I run the test suite I see

No commands were issued in this test

for each scenario.

Screenshot 2024-02-19 at 12 16 00

I see from the code that this will never work because configuration set via tags is always set on the test, ie it.

If this feature request is reasonable I'm happy to create a pull request for it.

Versions

  • Cypress version: 13.6.4
  • Preprocessor version: 20.0.1
  • Node version: 13.6.4

Checklist

  • I've read the FAQ.
  • I've read instructions for logging issues.
  • I'm not using cypress-cucumber-preprocessor@4.3.1 (package name has changed and it is no longer the most recent version, see #689).
@badeball
Copy link
Owner

If this feature request is reasonable I'm happy to create a pull request for it.

That'd be fine. I recommend that you specify the desired behavior using tests before implementing anything though, and use that to propose new behavior.

@mallison
Copy link
Contributor Author

I recommend that you specify the desired behavior using tests

I've create a pull request with a test showing the desired behaviour. I'd played around with implementation, as it looked like a small change, so I pushed those changes too.

badeball added a commit that referenced this issue Mar 1, 2024
@badeball
Copy link
Owner

badeball commented Mar 3, 2024

This has been fixed with v20.0.2.

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