cypress-tags
cypress-tags copied to clipboard
Cypress 10 + cypress-tags 1.0.0 looking for cypress.json
Currently on Cupress 10.3.1 and trying to add cypress-tags (version 1.0.0 showing in package-lock.json).
Whenever I attempt to run any cypress-tags commands, I see the following error:
Failed to read cypress.json, using default configuration Spec files: cypress/integration/**/*.feature No matching tags found
Any ideas why it is still searching for cypress.json instead of the new cypress-config.ts for Cypress 10+? Is there a way I can override which config file it attempts to use?
Hi @pdisselhorst
Are you sure that's a cypress-tags issue? Cypress is the one that will look up your cypress.json or cypress.config.ts file. Cypress-tags is just a pre-processor.
I would also suggest upgrading to [email protected]
as there were a couple of bug fixes added.
Same thing happens here since we upgraded to Cypress 10.6.0 coming from Cypress 8.0.0, happening with cypress-tags 1.1.2

My thoughts are that maybe something changed with the interface (we used cypress tags with cucumber) and i'm seeing in the documentation a different way of tags, for example it('mobile', 'Foo bar')

I will be deep-diving and follow up if I find solution!
@pdisselhorst just for context in case it helps us deep-dive, do you use cucumber in your project?
@nikotomad can you share your cypress.config.ts
?
@nikotomad can you share your
cypress.config.ts
?
Yes, surely. I've hidden some values but the context is still there (keep in mind this is a custom config file for mobile but same happens with the main config entry point regardless)
More context:
- the scenarios run fine with
yarn open
but have issues withyarn test
(this will be problematic for our CI) - our script in the package.json is:
"test:mobile": "cypress-tags run --env TAGS='@mobile' -b chrome --config-file 'cypress.mobile.config.js' --record\",
Appreciate you reaching back to us
Hi @nikotomad
It looks like you're not actually using cypress-tags
as your preprocessor. I don't think the plugin would be compatible cucumber for this reason, as they both filter tests in different ways.
As per this issue (https://github.com/infosum/cypress-tags/issues/29) we currently can't support running alongside other preprocessors.
I would suggest if you're using cucumber then you will need to use their inbuilt test filtering.