【问题标题】:VS Code - Cucumber - navigate clicking the feature command to step definitionVS Code - Cucumber - 单击功能命令导航到步骤定义
【发布时间】:2021-09-06 10:34:31
【问题描述】:

在 VS Code 中,我已经安装了 Full Cucumber 支持插件,但是我无法从功能文件中跳转到步骤定义,点击功能命令。

我所有的功能文件都在以下子文件夹中:

cypress/integration/features/folderName1/feature1.feature
cypress/integration/features/folderName2/feature2.feature

等等

我所有的步骤定义文件都在:

cypress/support/step_definitions/folderName1/stepdef1.js
cypress/support/step_definitions/folderName2/stepdef2.js

等等

在 settings.json 我有这个:

 "cucumberautocomplete.steps": [
        "cypress/support/step_definitions/**/*.js"
    ],
    "cucumberautocomplete.syncfeatures": "cypress/integration/features/**/*.feature",
    "cucumberautocomplete.strictGherkinCompletion": true

但它不适用于功能文件中的任何步骤,例如:无法找到“当我单击链接时”的步骤

【问题讨论】:

    标签: visual-studio-code cucumber cypress


    【解决方案1】:

    好的,我终于找到了问题所在。我有一个工作区,里面有 2 个在 VS Code 中创建的项目。仅当 cypress 项目位于工作区的首位时,该扩展才有效。

    所以我更改了工作区中项目的顺序,现在单击功能命令会跳转到步骤定义!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多