cypress grep filter not working correctly when define tag via class #30867
Unanswered
CuongPham9212
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
in my project, I'm using cypress grep tag to filter spec and run in CI
I declare the tag in the class
example
../support/taglist.js
and in the spec file using tag to filter:
e2e/event.spec
then run the command:
npx cypress run --config 'baseUrl=https://example.com,retries=0' --env 'grepTags=smoke_suite+web,environmentName=integration'
but the log return as run all specs and filter at run-time instead of filter specs with tags first then run it:
loading ./cypress.integration.json
loaded settings for environment integration
@cypress/grep: filtering using tag(s) "smoke_suite+web"
@cypress/grep: will omit filtered tests
grep and/or grepTags has eliminated all specs
grepTags: smoke_suite+edge
Will leave all specs to run to filter at run-time
the result is: it will run all specs but will return 0 passing when specs doesn't contain tags and will return 1 passing (for example) when running specs with tag pass via class -> it makes test result report display incorrectly
The question is: why it is running correct when past string to the tags but it isn't running correctly when add tags via class
Beta Was this translation helpful? Give feedback.
All reactions