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

Can not go to correct step definition and highlighting of undefined steps in VS code #471

Open asawan11 opened 10 months ago

asawan11 commented 10 months ago

Describe the bug There are two bugs, pointing to similar issue

  1. If gherkin step defined with step definition -> it can not go to correct step definition
  2. Any steps which are not defined with step definition -> it is not highlighted as missing gherkin step definition

To Reproduce Steps to reproduce the behaviour:

  1. Define gherkin step with step definition using Python(in VS code), with having "Doc string" ends with gherkin word(GIVEN,WHEN,AND,THEN) -> This will cause above two bugs.

Expected behavior Any python doc string ends with any word should not cause the bug

Screenshots Bug1: This step is defined as a step definition but when clicked for go to definition -> it is going to the step definition which is having doc string ends with gherkin word (below screenshot) image

Bug2: None of the steps are defined as a step definition, but it is not highlighting it as a un-defined step. image

Step definition: @when("ACC sees a new vehicle") def step_impl(context): """ I want this to be when ACC radar sees a new vehicle ahead This should be based on ACC vehicle ahead and when """ pass

Gherkin step line Bug1: screenshot attached Bug2: screenshot attached