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

Does not recognize alternate text/strings using / #496

Open
jonyo opened this issue Jun 4, 2024 · 2 comments
Open

Does not recognize alternate text/strings using / #496

jonyo opened this issue Jun 4, 2024 · 2 comments

Comments

@jonyo
Copy link

jonyo commented Jun 4, 2024

Describe the bug
In the cucumber docs, see alternate text

It allows using word1/word2 to make a loose match, much like you can add (s) to match with s or not s at the end.

I tried using it, Then I check/enable the {string} checkbox/toggle - since for us, "toggle" and "checkbox" are interchangeable and the code behind them is the same.

The editor does not recognize that and it shows a little squiggly line showing it is not defined. But it runs just fine.

To Reproduce
Steps to reproduce the behavior:

  1. Add a step like Then('Then I check/enable the {string} checkbox/toggle', ...)
  2. In a feature file, try using Then I enable the "Foo Bar" toggle
  3. See that in the editor, it shows the step is not defined, and CMD+click does not work. However just running cucumber works so you know it is valid or it would complain.

Expected behavior
It recognizes the Then I enable the "Foo Bar" toggle and cmd+click on it takes you to the step definition for Then('I check/enable the {string} checkbox/toggle')

Screenshots
If applicable, add screenshots to help explain your problem.

Cucumberautocomplete part of VSCode settings:

{
  "cucumberautocomplete.steps": ["tests/**/steps/*.ts"],
  "cucumberautocomplete.syncfeatures": "tests/**/feature/*.feature",
  "cucumberautocomplete.strictGherkinCompletion": true,
  "cucumberautocomplete.onTypeFormat": true,
  "cucumberautocomplete.formatConfOverride": {
    "Feature": 0,
    "Background": 0,
    "Scenario": 0,
    "Step": 1,
    "Given": 1,
    "When": 1,
    "Then": 1,
    "And": 1,
    "But": 1,
    "\\*": 1,
    "Examples": 0,
    "Example": 1
  },
}
@seansfkelley
Copy link

Duplicate of #480.

@dheeraj-umesh-tfs
Copy link

dheeraj-umesh-tfs commented Oct 5, 2024

I was able to reproduce the issue as mentioned by @jonyo
in my case steps definition used with parsers.parse is not identified, other step definition used without parsers.parse are able to get the step definition by CucumberAutoComplete
However the script works when executed, issue is only with CucumberAutoComplete
Steps defination with parsers parse is not identified
Yellow warning sign to indicate step defination is missing

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

3 participants