-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Inverted tag for cypress-grep and grepUntagged doesn't work #28189
Inverted tag for cypress-grep and grepUntagged doesn't work #28189
Comments
I also have an idea about how to fix the problem and I'll open a PR on this week |
Repository with a reproducible example: https://github.com/CaiqueCoelho/cypress-grep-bug-example |
Hey @jennifer-shehane I've uploaded a repository with a reproducible example: https://github.com/CaiqueCoelho/cypress-grep-bug-example |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue has been closed due to inactivity. |
Current behavior
Today I have some tests without tags, for example:
file1.cy.test.js
-> Spec file 1And I have other tests with tags on the describe block:
file2.cy.test.js
-> Spec file 2I've tried running Cypress with:
npx cypress run --browser chrome --env grepTags=-@burn
But all tests are running including the ones with
@burn
on the describe block(test 3 and 4)I also tried running Cypress with:
npx cypress run --browser chrome --env grepUntagged=true
But I still have all tests running including the ones with
@burn
on the describe block(test 3 and 4)Looking into the logs looks like when using
grepUntagged=true
cypress-grep filters out all tests even the ones without tags on it and describe block, and because cypress-grep is running all testsDesired behavior
npx cypress run --browser chrome --env grepTags=-@burn
we should see only the tests in file 1 being executed because we want to run all tests with the exception of tests with the burn tag, which in this case must be inherited from the describe block in file 2npx cypress run --browser chrome --env grepUntagged=true
we should tun only the tests without tags, in this case also the tests on file 1, becase file 2 has the tag burn on the describe blockTest code to reproduce
I'm creating a small repo with the reproducible example and I'll add the comments at the end of the day
Cypress Version
12.17.4
Node version
v18.18.2
Operating System
macOS 12.4
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: