Skip to content

@cypress/grep All the specs are listed if there is no matching tagΒ #25020

Open
@ajil-paul

Description

@ajil-paul

Current behavior

Consider there are only 3 specs in the cypress. And 3 of them have @smoke as the tag.
But If I run the cypress with grepTags = @fast
Then cypress is listing all the 3 specs. But those specs have only a @smoke label.

Let's say, I have added a @fast tag for one spec. Then it will list only that matching spec.

So if there are no specs that have the matching tag, then cypress will list all the specs.

Desired behavior

If there are no specs with the tag @fast and we run with grepTags = @fast, then Cypress should show an empty list of specs instead of listing all specs.

Test code to reproduce

env: {
    grepFilterSpecs: true,
    grepOmitFiltered: true,
	grepTags: "@fast"
  },

Add some specs with @smoke as tags and run.

Cypress Version

11.2

Node version

v18.12.1

Operating System

macOs

Debug Logs

No response

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    E2EIssue related to end-to-end testingTriagedIssue has been routed to backlog. This is not a commitment to have it prioritized by the team.npm: @cypress/grep@cypress/grep package issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions