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

@And annotated steps are not see by the autocomplete #147

Closed
peterdstone opened this issue Mar 13, 2023 · 5 comments
Closed

@And annotated steps are not see by the autocomplete #147

peterdstone opened this issue Mar 13, 2023 · 5 comments

Comments

@peterdstone
Copy link

πŸ‘“

@and annotated steps are not see by the autocomplete

βœ…

auto complete should highlite @and defined steps

πŸ“¦

io.cucumber:cucumber-java:7.7.0,
Java 17,
vscode 1.76.1
plugin 1.7.0

πŸ”¬ create a java feature file with @and annotated steps

Steps to reproduce the behavior:

  1. add @Annotated method to java class
  2. configure class to be picked up by glue settings
  3. start writing .feature file
  4. try to use step

image

image

πŸ“š Any additional context?

@jeeeem
Copy link

jeeeem commented Jul 22, 2023

I wanted to this ask too, is this now the current behavior of this as a general standard when working with cucumber, that I have to change all the @And annotated methods to @Given since I cannot use to Go to Definition if I do not did that?

@jenisys
Copy link

jenisys commented Jul 22, 2023

Mmh, you normally only need @Given, @When and @Then (3 step types).
And and But in Gherkin files are only used to state Use the same step-type than before myself. This means, you inherit the step-type from one of the steps before (that is not And or But).

BUT: In the step-implementation, you need to state which step-type is used.
This allows you also to change the ordering of steps.

@jeeeem
Copy link

jeeeem commented Jul 22, 2023

Mmh, you normally only need @Given, @When and @Then (3 step types). And and But in Gherkin files are only used to state Use the same step-type than before myself. This means, you inherit the step-type from one of the steps before (that is not And or But).

BUT: In the step-implementation, you need to state which step-type is used. This allows you also to change the ordering of steps.

Okay, so I will take it as yes on my question.

@kieran-ryan
Copy link
Sponsor Member

Closing as per above comments and as the keyword is unsupported in the Cucumber ecosystem by design. However it is possible this support could arrive with an implementation to configure the keywords that the autocompletion matches against (see #146). Thanks for raising!

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

5 participants