jlagerweij / cucumber-kotlin

Jetbrains plugin for Cucumber step definitions written in Kotlin
https://plugins.jetbrains.com/plugin/10527-cucumber-for-kotlin
Other
20 stars 16 forks source link

Add support for cucumber expressions #21

Closed Darkvater closed 3 years ago

Darkvater commented 4 years ago

Plugin does not have support for cucumber expressions (https://cucumber.io/docs/cucumber/cucumber-expressions/). The following is not recognized as a step and Intellij complains about "Undefined step reference". Tried both 2019.3.4 and 2020.1. The bundled cucumber plugins correctly recognize expressions for Java/groovy.

"When I have 10 flowers"

When("I have {int} flowers") { flowerCount: Int ->
  // ...
}

The similar normal regex does work: "When I have 10 cucumbers"

When("^I have ([0-9+])$") { cucumberCount: Int ->
  // ...
}
childnode commented 3 years ago

related to https://github.com/jlagerweij/cucumber-kotlin/issues/11 ? But as far as I see, "primitive types" like {int} are no problem to me (cucumberForKotlin 1.1.4 + Android Studio 4.1 RC 1 @ 201.8743.12.41.6719854 aka intelliJ CommunityEdition 2020.1.4) only problem aside #11 is #23 where ambiguous definitions are marked as not-defined, perhaps you should check for another I have ????? flowers definition?!

jlagerweij commented 3 years ago

This now works in the 2020.2.x versions