This repository has been archived by the owner on Mar 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
grepFilterSpecs not working with multiple tags #98
Labels
Comments
Are you trying to run tests that have Tag1 OR tests Tag2?
…Sent from my iPhone
On Dec 21, 2021, at 11:51, Luis Olavarria ***@***.***> wrote:
I have two specs with different tags:
cypress.env.json file:
{
"skipAccessChecks": false,
"test_env": "prod",
"grepOmitFiltered": true,
"grepFilterSpecs": true
}
test1.spec.js:
describe('Test 1', { tags: 'tag1'}, () => {
expect(true).to.be.true
})
test2.spec.js:
describe('Test2', { tags: 'tag2'}, () => {
expect(true).to.be.true
})
Then I'm trying to run with this command:
npm run cy:test -- --env grepTags='#tag1+#tag2'
This is being printed out when execution starts:
cypress-grep: filtering using tag "#tag1+#tag2"
cypress-grep: will omit filtered tests
cypress-grep: filtering specs using tag "#tag1+#tag2"
Grep "undefined" has eliminated all specs
Will leave all specs to run to filter at run-time
If I remove one of the tags it works fine:
npm run cy:test -- --env grepTags='#tag1'
cypress-grep: filtering using tag "#tag"
cypress-grep: will omit filtered tests
cypress-grep: filtering specs using tag "#tag"
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
I have tried both AND and OR and getting the same result |
I should have given the OR example, as AND will not find any test with both tags, I just wanted to give the 'example',
|
🎉 This issue has been resolved in version 2.12.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks for the quick fix, this is a great plugin thanks a lot for your work! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have two specs with different tags:
cypress.env.json file:
{
"skipAccessChecks": false,
"test_env": "prod",
"grepOmitFiltered": true,
"grepFilterSpecs": true
}
test1.spec.js:
test2.spec.js:
Then I'm trying to run with this command:
npm run cy:test -- --env grepTags='#tag1+#tag2'
This is being printed out when execution starts:
If I remove one of the tags it works fine:
The text was updated successfully, but these errors were encountered: