-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Unrecognised tokens in step definition in php (Behat) files #223
Comments
Thanks for catching this @MolbioUnige - moved to the Cucumber Language Service project β @nirajacharya2 and @thomas-hiron, you've both recently made fantastic contributions on the php implementation; wonder whether something you could look at whether you can reproduce and additionally whether you could look at what might be a suitable fix? |
Hello, I added a failing test case here: thomas-hiron@7582299 As for @MolbioUnige issue, it looks different as When I do custom steps with variables, I write them like Behat contexts: /**
* @Given /^(?:|I )am on "(?P<page>[^"]+)"$/
*/
public function visit($page)
{
$this->visitPath($page);
} I'll check if Edit |
@thomas-hiron you can not add a test case in stepdefinition like that. For that, you'd need to change ExpressionBuilder.test.ts as well. My understanding is that this test file expects only two steps, with precise definition, the two that are defined actually. Behat is the only php framework I know for Gherkin files. How do you test your feature files? |
Yes, that was not meant to be merged, but to highlight the fact that ES regex processor doesn't handle Behat default regex! I do test my feature files with Behat also! For your precise issue, maybe the language service should replace .replace(/:[a-z0-9]+/, ':[a-z0-9]+') This should transform your |
Dear maintainers, is there anything else I need to do for my PR to be taken in account? |
would be great that get this work or to provide another way to achieve that. |
π What did you see?
LSP don't recognize context having token defined. This is a scenario I have:
And here the related contexts:
β What did you expect to see?
The first two contexts are recognised by the lsp and I can jump to their definition, but not the third one. I tried without the surrounding double quotes but it has the same effect.
π¦ Which tool/library version are you using?
Cucumber Language Server 1.6.0
π¬ How could we reproduce it?
No response
π Any additional context?
No response
The text was updated successfully, but these errors were encountered: