Open vincentdebruijn opened 5 years ago
+1 for this.
I'm also using optional parts with whitespace a lot. Examples:
When("(the user )clicks the button {string}")
which will match both
When the user clicks the button "Save" And clicks the button "Close"
If you need a quick fix, modify your extension code:
\server\steps.handler.js:
//Optional Text step = step.replace(/\(([a-z]+)\)/g, '($1)?');
to (add \s after z)
//Optional Text step = step.replace(/\(([a-z\s]+)\)/g, '($1)?');
Any progress on this?
Any progress? I'm stucked with this problem too
Any update?? I'm facing this issue too :(
+1
I also need to use optional parts because the gramatical rules in portuguese :/
Given("(que eu )aciono a opção {string}")
Then('I should (still )see {string} on the page', function (text) {
cy.contains(text).should('be.visible')
})
Same issue here.
Hi @alexkrechik! This issue is very annoying for us as well. I've created a PR https://github.com/alexkrechik/VSCucumberAutoComplete/pull/509 with the fix proposed in https://github.com/alexkrechik/VSCucumberAutoComplete/issues/292#issuecomment-628604654. Could you have a look, as one parsing test is failing and for me it's difficult to identify how to fix. Thanks in advance!
Describe the bug (Probably related to other issues about special characters in steps) The autocomplete does not match when an optional part contains whitespace. So the feature file shows the green squiggly line under the step.
On version 2.14.1
To Reproduce The step:
matches (no green squiggly line) with the following step definition:
but does not match (shows green squiggly line) the following step definition:
(this last step DOES match when the original step is:
Expected behavior I would expect the autocomplete to match a step which does not contain an optional part with whitespace.
Note: cucumber does match the step; the test runs fine.
settings.json