cypress-io / cypress-grep

Filter tests using substring
137 stars 19 forks source link

GrepTags doesn't work with multiple env configuration files #58

Closed bruno-nelli closed 3 years ago

bruno-nelli commented 3 years ago

Issue: When using a multiple configuration file with configFile and grepTags it doesn't work properly filtering the tag and applying ENV.

Desired result: Execute tests with the env variable and filter scenarios with tags at same execution

Information to recreate: cypress version 7.30 cypress-grep version 2.5.2

Need a project multiple configuration files to use --env configFile=ENV https://docs.cypress.io/api/plugins/configuration-api#Switch-between-multiple-configuration-files

I have uploaded a project to reproduce the issue: https://github.com/BrunoNelli/grep_issue

J-Harms commented 3 years ago

In the project repo you mention some commands that did not work. I am curious if this command would work with it?

npx cypress run --env grepTags=@TES-T5967,configFile=HMP

https://docs.cypress.io/guides/guides/command-line#cypress-run-env-lt-env-gt: "Pass several variables using commas and no spaces. Numbers are automatically converted from strings. cypress run --env host=api.dev.local,port=4222"

bruno-nelli commented 3 years ago

In the project repo you mention some commands that did not work. I am curious if this command would work with it?

npx cypress run --env grepTags=@TES-T5967,configFile=HMP

https://docs.cypress.io/guides/guides/command-line#cypress-run-env-lt-env-gt: "Pass several variables using commas and no spaces. Numbers are automatically converted from strings. cypress run --env host=api.dev.local,port=4222"

Thanks @J-Harms, it worked as I need.