-
-
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
Glue code with escaped quotation marks is not recognized. #172
Comments
Thanks for capturing @klauerm. This logic is defined in Cucumber Expressions; it advises the below output. [Info - 19:04:31] Scheduling reindexing in 3000 ms
[Info - 19:04:32] Unable to generate step definition. Please create one first manually.
[Info - 19:04:34] Reindexing file:///Users/<user>/repository
[Info - 19:04:35] * Found 3 feature file(s) in ["src/test/**/*.feature","features/**/*.feature","tests/**/*.feature","*specs*/**/.feature"]
[Info - 19:04:35] * Found 7 steps in those feature files
[Info - 19:04:35] * Found 1 glue file(s) in ["features/**/*.java"]
[Info - 19:04:35] * Found 0 parameter types in those glue files
[Info - 19:04:35] * Found 0 step definitions in those glue files
[Error - 19:04:35] * Step Definition errors: Error: This Cucumber Expression has a problem at column 12:
I have an \"expression\"
^
Only the characters '{', '}', '(', ')', '\', '/' and whitespace can be escaped.
If you did mean to use an '\' you can use '\\' to escape it Moving issue to Cucumber Expressions. Someone may be able to advise on most appropriate usage in this case, or whether any changes are required. |
@klauerm you're using The grammar in that version is different than the one used by the vscode plugin. I don't think this this is what causes the mismatch but do consider upgrading to the latest version. @kieran-ryan, it also looks like the vscode plugin doesn't handle escaped characters correctly. This step definition: @When("I click on the icon for \"Edit Expression\"") Has, after handeling the Java escapes, the expression: I click on the icon for "Edit Expression" But it looks like the plugin takes the literal value from the annotation without handeling the escapes i.e: I click on the icon for \"Edit Expression\" This is probably a problem in the plugin. |
Cheers @mpkorstanje! Transferred to Language Service where that logic is implemented, will plan to take a look into a fix |
Duplicates earlier #111 |
👓 What did you see?
I'm having the following step definition:
The corresponding glue code search pattern is:
The cucumber extension does not recognize this glue code as step definition of the above step.
✅ What did you expect to see?
The corresponding IntelliJ plugin does recognize it.
When I execute my cucumber tests, they are working fine.
So I expect, that I can navigate from my feature file step to the glue code and the step isn't underlined as "Undefined Step"
📦 Which tool/library version are you using?
I'm using cucumber-java-4.3.1 with java version 11.
🔬 How could we reproduce it?
@When,
replace the generated{string}
with\"Edit Expression\"
The text was updated successfully, but these errors were encountered: