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

Unable to navigate from step definitions file to functions(in page objects) for CodeceptJS dependency injection implementation #502

Open ledara7 opened 4 months ago

ledara7 commented 4 months ago

Describe the bug I am trying to CMD+Click on the functions defined in my step definitions file and keep getting 'No definition found'. I have managed to get the extension work when I'm trying to do the same from a feature file to step definitions, however it doesn't work from step definition to page objects.

To Reproduce Steps to reproduce the behavior:

  1. We have CodeceptJS dependency injection implementation
  2. Go to step definition file and CMD+Click on a function, then select 'Go to Definition'
  3. it's returning 'No definition found' popup

Expected behavior I expect this to take me to the page objects and exactly to the line where function was defined.

Screenshots Screenshot 2024-07-09 at 16 32 32

Cucumberautocomplete part of VSCode settings:

{
  "cucumberautocomplete.steps": [
    "e2e/tests/steps/*.js",
    "e2e/tests/steps/**/*.js",
    "e2e/pages/**/*.js"
  ],
  "cucumberautocomplete.syncfeatures": "e2e/tests/features/*.feature",
  "cucumberautocomplete.strictGherkinCompletion": true,
  "cucumberautocomplete.smartSnippets": true,
  "cucumberautocomplete.stepsInvariants": true,
  "cucumberautocomplete.customParameters": [
    {
      "parameter": "{string}",
      "value": "\"([^\"]*)\""
    }
  ],
  "editor.quickSuggestions": {
    "comments": false,
    "strings": true,
    "other": true
  },
  "cucumberautocomplete.formatConfOverride": {

  }
}

Step definition: If applicable, add example of step definition:

Then('The the success banner will appear', async () => {
  await sessionOrganizerPage.successMessage();
});

Gherkin step line Then The the success banner will appear