Skip to content

Step with forward slash OR operator and quotes not being matched #529

@andre-ribeiro-almeida-alb

Description

Describe the bug
When using strict validation settings, a step which uses an or operator with forward slash / and a {string} argument, is not being matched to its definition when correctly written.

To Reproduce
Steps to reproduce the behaviour:

  1. Clone my playwright-bdd-example
  2. Open it on vscode
  3. Enable the extension

Expected behavior
The step being recognised.

Screenshots

Image

Cucumberautocomplete part of VSCode settings:

{
  "cucumberautocomplete.steps": ["features/steps/*.{ts,js}"],
  "cucumberautocomplete.strictGherkinCompletion": true,
  "cucumberautocomplete.strictGherkinValidation": true
}

Step definition:

Then('This step should/texts be matched with quote {string} with slash', async ({ page }) => {
  await expect(page).toHaveURL(/.*playwright\.dev.*/);
});

Gherkin step line
Then This step should be matched with quote "some quote" with slash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions