Skip to content
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

Tests tagged in it() are not run if describe() is also tagged but with a different tag. #25

Closed
TomaszG opened this issue Apr 1, 2021 · 2 comments
Assignees
Labels
bug Something isn't working confirmed Successfully replicated
Milestone

Comments

@TomaszG
Copy link
Contributor

TomaszG commented Apr 1, 2021

I'm not sure if that's a bug, however, I was surprised when my tests were not run despite the fact they have a correct tag set.

This can be easily reproduced with cypress-tags-example repo: https://github.com/annaet/cypress-tags-example

  1. Clone and run npm i
  2. Run CYPRESS_INCLUDE_TAGS=FEATURE npx cypress run
  3. Check if it([Tag.FEATURE], 'I will also become a wip test', () => { }) from enum.spec.js has been run.

The expected result in my understanding is that test should be run, however, it isn't because the whole describe is tagged as WIP (but WIP wasn't excluded so it shouldn't matter).

@TomaszG TomaszG changed the title Tests tagged in it() are not run if describe() is also tagged with a different tag. Tests tagged in it() are not run if describe() is also tagged but with a different tag. Apr 1, 2021
@annaet
Copy link
Contributor

annaet commented Apr 19, 2021

Hi @TomaszG

Thanks for your comment, and I think you're right!

It was originally planned that if a test was tagged but wasn't tagged with the requested tag, it would get ignored. Then I duplicated this functionality for describe blocks without much thought about the interaction between them.

Your point that we're not ignoring WIP tags in your example means that the tag at the describe block level should be ignored, and fall to the individual test tags instead.

This is still quite a new project, so thanks for raising this issue! I'll let you know when I get this fixed and a new version released.

@annaet annaet added bug Something isn't working confirmed Successfully replicated labels Apr 19, 2021
@annaet annaet self-assigned this Apr 19, 2021
@annaet annaet added this to the 0.1.0 milestone Apr 26, 2021
@annaet
Copy link
Contributor

annaet commented May 25, 2021

Hi @TomaszG I've just release v0.1.0 of cypress-tags. I believe this version should fix your issue.

Please let me know if you're still experiencing any issues after upgrading.

@annaet annaet closed this as completed May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed Successfully replicated
Projects
None yet
Development

No branches or pull requests

2 participants