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

Cucumber autocomplete in feature file not working #426

Closed DerZyklop closed 1 year ago

DerZyklop commented 2 years ago

Describe the bug I installed cucumberautocomplete in my VSCode but it does not do anything. No autocomplete, no underlined steps when they are not part of my steps files, nothing.

Tested it on three computers with our project. Tested it in a new test-project-folder on my mac. For the second, see screenshot.

To Reproduce Steps to reproduce the behavior:

  1. Install VSCode
  2. Install cucumberautocomplete
  3. Create file feature/foo.feature with content
  4. Create file steps/foo.steps.ts, but leave it empty

Expected behavior Underlined Given Hello World. Plus… shouldn’t there be some output for this extension? I don’t get an entry for this extension in my »Output« dropdown:

Screenshot 2022-02-07 at 11 54 52

Screenshots Screenshot 2022-02-07 at 11 05 10

Cucumberautocomplete part of VSCode settings:

{
    "cucumberautocomplete.syncfeatures": "feature/*.feature",
    "cucumberautocomplete.steps": ["steps/*.ts"]
}

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

// no step definition

Gherkin step line If applicable, add step line from gherkin file Given Hello World

doktordirk commented 2 years ago

I think it's just extremely slow. It takes at least 1min for me to start up or to pick-up changes in step definitions. It's so slow, it's of no use atm for unfortunately :unamused:

Edit: Found my issue. I used "**/steps/*.step.ts" for "cucumberautocomplete.steps. I guess that was a bit greedy. Changing to "*steps/*.step.ts" solved it for me

DerZyklop commented 1 year ago

@doktordirk Thank you for your comment. Unfortunately, this did not help in my case. It is still not working.

DerZyklop commented 1 year ago

I wonder how I could debug this issue. Can anyone give me a hint how to get any output?

alexkrechik commented 1 year ago

Hello there! What type of output do you expect? There are no runtime logs in the extension, all the error and warnings would be shown in the UI. Also, feature files would not be checked in case of no steps. You should add at least one step to get 'such step is not exist' warning.

DerZyklop commented 1 year ago

I can not tell what was going wrong. We restructured our folders and environment. Nowadays, it's working fine. Sorry to bother you, and thanks again for the try to help. I think, since no one else commented on this with a similar issue, it can be closed.