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

Step recognised but not highlighted/linking to Step Definition when Scenario Outline parameter is used #158

Closed
nextlevelbeard opened this issue May 4, 2023 · 3 comments

Comments

@nextlevelbeard
Copy link

Given('I have a Dream', async () => {
  // Expect things
})
Scenario Outline: User can jump to step definition with a parameter: <parameter>
    Given I have a <param> # Does not highlight/link but is recognized/defined
    Examples: 
      | param |
      | Dream |

Also, in Scenario Outlines undefined steps are always recognized as defined when they aren't, no undefined warning is issued

Scenario Outline: User can recognize undefined steps in Scenario Outlines
    Given I have a something that is undefined # Recognized as defined when it should not
    Examples: 
      | param |
      | Dream |
@clobraico-hf
Copy link

clobraico-hf commented May 25, 2023

I have the same issue

@kieran-ryan
Copy link
Sponsor Member

Hi @nextlevelbeard and @clobraico-hf, thank you for raising this issue.

The root cause lies within the Cucumber Language Service: it disables diagnostics for undefined steps if the test is a scenario outline (has an examples table) - so rather than being "always recognized as defined" for scenario outlines, the validation is actually disabled. My reasoning as to why this is yet to be supported is due to the challenges in ensuring clear and reliable behaviour to classify steps referencing examples table values as 'undefined'. This is in comparison to steps without parameters, where we can pass the step text to a validation function in its raw format.

I have captured an issue proposing this as a feature request (cucumber/language-service#149). I would greatly appreciate if you could take a look and provide any feedback.

@kieran-ryan
Copy link
Sponsor Member

Closing this issue as a duplicate of #90. Thanks again for raising, please continue discussion on that issue 🙌

@kieran-ryan kieran-ryan closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2023
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

3 participants