黄瓜(小黄瓜)VS Code的完整支持扩展无法找到以下步骤:

时间:2019-10-17 08:51:25

标签: visual-studio-code cucumber

我正在使用VS代码,并且黄瓜扩展https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete&ssr=false#overview无法正常工作。 这是我的.vscode文件夹中的settings.json:

{
"cucumberautocomplete.steps": [
    "src/step_definitions/*.js",
],
"cucumberautocomplete.syncfeatures": "src/features/*feature",
"cucumberautocomplete.strictGherkinCompletion": true,
"cucumberautocomplete.strictGherkinValidation": true,
"cucumberautocomplete.smartSnippets": true,
"cucumberautocomplete.stepsInvariants": true,
// "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
},
"cucumberautocomplete.gherkinDefinitionPart": "(Given|When|Then)\\(",
"cucumberautocomplete.stepRegExSymbol": "'"
}

这就是我添加到VS Code的settings.json中的内容:

{
"workbench.colorTheme": "Default Light+",
"editor.quickSuggestions": true,
"window.zoomLevel": 0
}

在功能文件中,我会收到每一行的消息: “无法找到“鉴于我在仪表板页面“ cucumberautocomplete”上的步骤”

有人可以帮助解决此问题并使之适用于VS Code吗?

亲切的问候, 误会

2 个答案:

答案 0 :(得分:0)

所以当我:

I。删除的.vscode / settings.json(包括文件夹)
二。在Visual Sudio Code的全局settings.json(用户etc目录中的一个)中添加了以下内容

{
"workbench.colorTheme": "Default Light+",
"editor.quickSuggestions": true,
"window.zoomLevel": 0,
"gherkin-autocomplete.featuresPath": "src/features",
"cucumberautocomplete.steps": [
    "src/step_definitions/*.js",
],
"cucumberautocomplete.syncfeatures": "src/features/*feature",
} 

III。重新启动VS Code

插件=>出现问题,表示他们未实施,因为他们认为应该可以使用,或者文档过时了...

答案 1 :(得分:0)

我必须删除该行

"cucumberautocomplete.stepRegExSymbol": "'"

然后对我有用。