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

Cannot goto correct step definition #461

Open
zhangjun9876 opened this issue Mar 22, 2023 · 0 comments
Open

Cannot goto correct step definition #461

zhangjun9876 opened this issue Mar 22, 2023 · 0 comments

Comments

@zhangjun9876
Copy link

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}
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

1 participant