-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
In Python, all steps in Scenarios show as undefined, even for plain text matchers #226
Comments
Cheers @The-BDD-Coach - this is most helpful. You will observe from the logs that the extension However, based on the Due to the differences between regular expressions in Python and JavaScript, it fails to match your step definition that uses a regular expression - specifically on the 'search_term' portion. We can repurpose this report to examine reconciling that issue and move it to the Language Service repository. |
Hello guys, I'm having an issue where even adding the right glue configuration I get this:
How can I see more information on the error "Failed to reindex"? What failed? Thank you |
Hey @neskk 👋 Looks like cucumber/language-service#181; are you using the latest version of the extension (v1.10.0), or otherwise if you can configure the extension to point to specific glue files to localise the issue and then share the file causing the issue, I’d be happy to investigate 👍 |
I was using v.1.09 in WSL and had v.1.10 on host machine. Now I'm getting this (similar repo):
I'll look into this, maybe parameter types are not defined. |
Awesome - delighted our latest release resolved the issue!
This refers to Cucumber Expressions parameter types which are natively unsupported in pytest-bdd at present, so would be expecting 0 parameter types in your case. However I see 0 step definitions detected which may be a result of us not fully supporting all matcher variants of pytest-bdd at present though can also occur if the path configuration for glue files is pointed to a different location than our step definitions - though assuming is not the case here. Feel free to open an issue on the Language Service; if you can also create a minimum reproducible example of definitions that are not getting detected; and link it, that can be really helpful. PRs are also welcome of course. |
@kieran-ryan Good catch on the directories; thank you! Pytest-BDD-NG does support Cucumber Expressions, but the VSCode plugin doesn't know how to parse the matcher syntax. I wrote cucumber/language-service#204 It also doesn't handle Pytest-BDD-NG Regular Expressions; I wrote cucumber/language-service#203 |
Great! Ok to close this issue in that case with the new opened issues @The-BDD-Coach? |
I think that is the right thing to do. |
👓 What did you see?
Using either Behave or Pytest-BDD-NG, most (probably all) steps are underlined, indicating that there are no matching step definitions. Right-clicking on a step and selecting 'Go to definition' says 'No definition for (the word the cursor is on)'. All of these step definitions worked in last year, but I don't know when they became broken.
✅ What did you expect to see?
All of these steps should NOT be underlined, and selecting 'Go to definition' should go to the step definition.
📦 Which tool/library version are you using?
Version: 1.88.1
Commit: e170252f762678dec6ca2cc69aba1570769a5d39
Date: 2024-04-10T17:43:08.196Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.4.0
Cucumber for VSCode v1.10.0
🔬 How could we reproduce it?
A minimal example is here: https://github.com/The-BDD-Coach/Step-Definition-Bug/tree/main
📚 Any additional context?
[Info - 10:19:21 AM] Initializing connection from Visual Studio Code 1.88.1
[Info - 10:19:21 AM] Root uri : file:///Users/leslie/Development/SBE_Class_Materials/temp/Python
[Info - 10:19:21 AM] Current dir : /
[Info - 10:19:21 AM] Registering request handler for workspace/didChangeConfiguration failed.
[Info - 10:19:21 AM] Client does not support client/registerCapability. This is OK.
[Info - 10:19:21 AM] Cucumber Language Server 1.6.0 initialized
[Info - 10:19:21 AM] Scheduling reindexing in 3000 ms
[Info - 10:19:21 AM] Scheduling reindexing in 3000 ms
[Info - 10:19:21 AM] Reindexing file:///Users/leslie/Development/SBE_Class_Materials/temp/Python
[Info - 10:19:21 AM] * Found 0 feature file(s) in ["src/test//*.feature","features//.feature","tests/**/.feature","specs//*.feature"]
[Info - 10:19:21 AM] * Found 0 steps in those feature files
[Info - 10:19:21 AM] * Found 0 glue file(s) in ["specs//.cs","features/**/.js","features//*.jsx","features//.php","features/**/.py","features//*.rs","features//.rb","features/**/.ts","features//*.tsx","features//_test.go","src/test/**/.java","tests//*.py","tests//*.rs"]
[Info - 10:19:21 AM] * Found 0 parameter types in those glue files
[Info - 10:19:21 AM] * Found 0 step definitions in those glue files
[Info - 10:19:21 AM] * Built 0 suggestions for auto complete
[Info - 10:19:21 AM] Unable to generate step definition. Please create one first manually.
The text was updated successfully, but these errors were encountered: