Skip to content

Grep not working when passing an array of tags as string variables  #30683

Open
@kevingorry

Description

@kevingorry

Current behavior

it('Activity Filter Date', { tags: [PR, E2E] }, () => { --> This will not work even though PR and E2E are variables that reference a string
it('Activity Filter Date', { tags: ['PR', 'E2E'] }, () => { --> This works when you pass the tags directly as strings

Desired behavior

We should be able to pass variables since on our projects it allow us to prevent people from adding the wrong tags or misspell something since they are forced to chose from a list.

Test code to reproduce

it('Activity Filter Date', { tags: [PR, E2E] }, () => {

Cypress Version

13.6.6

Node version

16.0.0

Operating System

Windows 11 Enterprise

Debug Logs

No response

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    npm: @cypress/grep@cypress/grep package issuesstage: needs investigatingSomeone from Cypress needs to look at thisstaleno activity on this issue for a long period

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions