After installing the "VSCode Cucumber (Gherkin) Full Language Support + Formatting + Autocomplete" plugin on my vscode editor, I was impressed by its ability to assist with cucumber formatting. According to the documentation, this plugin offers a feature that allows users to easily navigate between feature files, step definitions, and page objects by simply hovering over the corresponding text in the .feature file.
However, I found the documentation regarding path mapping between files to be lacking. Can anyone provide guidance on how to establish the desired syntax linking between feature files, step definitions, and page objects based on the directory structure shown below?
src
├── features
│ ├── accessibility
│ │ └── FeatureFile.feature
│ ├── Directory
│ │ ├── featureFile.feature
│ │ ├── SomeDirectory
│ │ │ ├── FeatureFile.feature
│ ├── step_definitions
│ │ ├── SomeDirectory
│ │ │ ├── someFile.js
│ │ │ ├── given.js
│ │ │ └── then.js
│ │ ├── given.js
│ │ ├── someFeature.js
│ │ ├── then.js
│ │ └── when.js
├── pageobjects
│ ├── SomeDirectory
│ │ ├── SomeFeature
To enable these features, refer to the example configuration provided in their documentation:
{
"cucumberautocomplete.steps": [
"test/features/step_definitions/*.js",
"node_modules/qa-lib/src/step_definitions/*.js"
],
"cucumberautocomplete.syncfeatures": "test/features/*feature",
"cucumberautocomplete.strictGherkinCompletion": true,
"cucumberautocomplete.strictGherkinValidation": true,
"cucumberautocomplete.smartSnippets": true,
"cucumberautocomplete.stepsInvariants": true,
"cucumberautocomplete.customParameters": [
{
"parameter":"{ab}",
"value":"(a|b)"
},
{
"parameter":/\{a.*\}/,
"value":"a"
},
],
"cucumberautocomplete.pages": {
"users": "test/features/page_objects/users.storage.js",
"pathes": "test/features/page_objects/pathes.storage.js",
"main": "test/features/support/page_objects/main.page.js"
},
"cucumberautocomplete.skipDocStringsFormat": true,
"cucumberautocomplete.formatConfOverride": {
"And": 3,
"But": "relative",
},
"cucumberautocomplete.onTypeFormat": true,
"editor.quickSuggestions": {
"comments": false,
"strings": true,
"other": true
}