alexkrechik / VSCucumberAutoComplete

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

Cannot goto correct step definition #461

Open zhangjun9876 opened 1 year ago

zhangjun9876 commented 1 year ago

Describe the bug Click step in feature file goto step definition, but now it will goto another definition.

To Reproduce Steps to reproduce the behavior:

  1. Add a step definition without args, but get """ value as the last argument in the step definition.
  2. Click on step in Gherkin.
  3. Most steps will goto the step definition. image
image

Cucumberautocomplete part of VSCode settings: Default settings.

Step definition: Most steps will goto this step definition

/**
 * @function body
 * @description set request body with multi-Line expressions
 * @example Then body
 *         """
 *         {
 *             "hello": "world",
 *             "baz": "ban"
 *         }
 *         """
 * @param {String} body request body
 */
Then('body', function (multiLineStr) {
    odataBase.setRequestUri('body');
    let build = odataBase.buildBody(multiLineStr);
    taScenarioContext.listAdd('body', build);
    reportLog.info('[API STEP][body]' + JSON.stringify(build));
});

Gherkin step line

Given Navigate to L2 menu "Create Business Partner" under L1 menu "Business Partners"
Then Set cardCode = 'C' + new Date().getTime().toString().substring(6)
Then Click Tab "General"
Then Input "[Basic Information]Code" as ${cardCode}