alexkrechik / VSCucumberAutoComplete

Cucumber (Gherkin) Full Support Extension for VSCode
https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete
MIT License
331 stars 82 forks source link

'Undefined. Implement with the following snippet' error when using cucumberautocomplete.customParameters #504

Open Kemot7 opened 4 months ago

Kemot7 commented 4 months ago

Describe the bug I don't know why, but I can't use the proper names for "parameter" when configuring cucumberautocomplete.customParameters. I get an error every time: Undefined. Implement with the following snippet: image

To Reproduce I am using TypeScript 5.5.2 A simple example, taken from the documentation:

Cucumberautocomplete part of VSCode settings:

   "cucumberautocomplete.customParameters": [
    {
      "parameter": "{ab}",
      "value": "(a|b)"
    }
  ],

Gherkin step line

When('I select {ab}',
  async (nameOfOption: string): Promise<void> => {
    console.log(`Selected option ${nameOfOption}:`);
  }
);

Step definition: And I select b

Note If I change {ab} to {word} then everything works. However, I can't apply any custom name (only those defined by default)