Open jlous opened 3 years ago
As it turns out, the fix is not that difficult. I have created 2021.1.1 release, this should be available via the plugins download of JetBrains as soon as they review it.
Thanks, it works, but unfortunately there is an important regression:
It seems that regex-syntax is not recognised any more. It was before, and it works fine with cucumber. Regex is still very useful when you want more complex or fine-grained matching than cucumber syntax affords, like params within optional clauses.
Should I post this as separate issue?
Can you give an example of what is not recognised?
And("^the product id is (\\d+)$")
The above does work for navigation.
Something like this is not working for me on 2021.1.1 and works fine on 2021.1.0:
And("^Product (?: with id (\\d+))? is valid")
Ah, I now see the problem and have submitted 2021.1.2 for review to Jetbrains
My step uses gherkin expression syntax, and contains optional text marked accordingly with parentheses:
Given("power is (already )on") {...}
(see https://cucumber.io/docs/cucumber/cucumber-expressions/#optional-text)The scenario using it runs perfectly, but the editor gets it wrong: If I include the optional text (
power is already on
), the editor highlights "already" as if it was a parameter. If I omit the optional text (power is on
), the editor marks the whole clause as "undefined step reference"It looks like the matcher always treats parentheses as parameters like in regex syntax, even though the step actually uses gherkin syntax. Other parts of gherkin syntax work fine, for instance {string} params