Skip to content

flags are not supported in Regex for cucumber steps #3212

Closed
@anils92

Description

@anils92

What are you trying to achieve?

Create a cucumber step using regex
Example Step: Given(/^I am on "([^"]+)" page$/i, openPageStep);

What do you get instead?

Error: No steps matching "I am on "Home" page"

Provide console output if related. Use --verbose mode for more details.

# No steps matching "I am on "Home" page"

Details

If you omit the flag i in the regex expression then it is working fine but the issue occurs only if you introduce any flag

  • CodeceptJS version: 3.1.1
  • NodeJS Version: v16.13.1
  • Operating System: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions