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

Unable to find steps with capture groups #501

Open
josemigallas opened this issue Jun 12, 2024 · 3 comments
Open

Unable to find steps with capture groups #501

josemigallas opened this issue Jun 12, 2024 · 3 comments

Comments

@josemigallas
Copy link

VS Code 1.89.1
Cucumber (Gherkin) Full Support 3.0.5

Config:

    "cucumberautocomplete.steps": [
      "features/step_definitions/**/*.rb",
    ],
    "cucumberautocomplete.strictGherkinCompletion": true,
    "cucumberautocomplete.smartSnippets": true,
    "cucumberautocomplete.stepsInvariants": true,
    "cucumberautocomplete.syncfeatures": "features/**/*.feature",

It looks like the extension is unable to find regexp steps containing capture groups. Consider the following 2 examples:

Step definition:

When /^(?:|I |they )go to (.+)$/ do |page_name|
  # Not found
end

When /^pepe is here$/ do
  # Yes found
end

Feature:

Screenshot 2024-06-12 at 08 46 38

Am I missing a specific config? Is this not supported? The rest of the time it works fine, it's just this kind of regexp that doesn't work.

Thanks in advance.

@lengors
Copy link

lengors commented Jul 4, 2024

VS Code 1.89.1 Cucumber (Gherkin) Full Support 3.0.5

Config:

    "cucumberautocomplete.steps": [
      "features/step_definitions/**/*.rb",
    ],
    "cucumberautocomplete.strictGherkinCompletion": true,
    "cucumberautocomplete.smartSnippets": true,
    "cucumberautocomplete.stepsInvariants": true,
    "cucumberautocomplete.syncfeatures": "features/**/*.feature",

It looks like the extension is unable to find regexp steps containing capture groups. Consider the following 2 examples:

Step definition:

When /^(?:|I |they )go to (.+)$/ do |page_name|
  # Not found
end

When /^pepe is here$/ do
  # Yes found
end

Feature:

Screenshot 2024-06-12 at 08 46 38

Am I missing a specific config? Is this not supported? The rest of the time it works fine, it's just this kind of regexp that doesn't work.

Thanks in advance.

Hello. Did you end up figuring it out?

@josemigallas
Copy link
Author

@lengors No, nothing.

@lengors
Copy link

lengors commented Jul 12, 2024

@josemigallas Ok, thank you anyways :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants