in IDEA 2019.1.3 with kotlin for cucumber plugin 1.1.1 enabled, the recognition of step defs between feature files and step defs can be fooled into recognising an incorrect step defintion match.
For example after creating this scenario:
Scenario: another terrifying scenario
Given I have some preconditions
When I do something
Then something happens
and copy/pasting (and java to kotlin converting the steps) I have these step definitons which are recognised and click through-able from the feature to the step def.
Given("I have some preconditions") {
// Write code here that turns the phrase above into concrete actions
throw cucumber.api.PendingException()
}
When("I do something") {
// Write code here that turns the phrase above into concrete actions
throw cucumber.api.PendingException()
}
Then("something happens") {
// Write code here that turns the phrase above into concrete actions
throw cucumber.api.PendingException()
}
If I add another step :-
Scenario: another terrifying scenario
Given I have some preconditions
When I do something
And I do something with a "value" set as a parameter
Then something happens
then the new step is incorrectly matched in the IDE to
When("I do something") {
// Write code here that turns the phrase above into concrete actions
throw cucumber.api.PendingException()
}
This is potentially a problem as it could mean someone misses adding the implementation of a step because the IDE doesn't point out that its missing.
running the test does generate the correct snippet
When("I do something with a {string} set as a parameter", (String string) -> { // Write code here that turns the phrase above into concrete actions throw new cucumber.api.PendingException(); });
which is converted as:
When("I do something with a {string} set as a parameter") { string: String -> // Write code here that turns the phrase above into concrete actions throw cucumber.api.PendingException() }
Could the plugin be fixed to recognise the difference between similar steps e.g. where they begin with the same text ?
Navigating from the feature to the step def adds a further problem, as the IDE doesn't know which step def to pick. I would expect it to be able to choose the correct one without help from the user (see below)

in IDEA 2019.1.3 with kotlin for cucumber plugin 1.1.1 enabled, the recognition of step defs between feature files and step defs can be fooled into recognising an incorrect step defintion match.
For example after creating this scenario:
and copy/pasting (and java to kotlin converting the steps) I have these step definitons which are recognised and click through-able from the feature to the step def.
If I add another step :-
then the new step is incorrectly matched in the IDE to
This is potentially a problem as it could mean someone misses adding the implementation of a step because the IDE doesn't point out that its missing.
running the test does generate the correct snippet
When("I do something with a {string} set as a parameter", (String string) -> { // Write code here that turns the phrase above into concrete actions throw new cucumber.api.PendingException(); });which is converted as:
When("I do something with a {string} set as a parameter") { string: String -> // Write code here that turns the phrase above into concrete actions throw cucumber.api.PendingException() }Could the plugin be fixed to recognise the difference between similar steps e.g. where they begin with the same text ?
Navigating from the feature to the step def adds a further problem, as the IDE doesn't know which step def to pick. I would expect it to be able to choose the correct one without help from the user (see below)
