我在给柏树装黄瓜时遇到了问题。我得到了以下错误: error:步骤实现缺失:我在Context.resolveAndRunStepDefinition的链接上(柏树/试验 at Context.eval (赛柏/试验?P=柏树\整合 ))
PACKAGE.JSON:
{
"scripts": {
"cypress-open": "cypress open",
"cypress-feature": "cypress run --spec **/*.feature"
},
"devDependencies": {
"cypress": "^9.6.1",
"cypress-cucumber-preprocessor": "^4.3.1",
"cypress-xpath": "^1.6.2"
},
"cypress-cucumber-preprocessor": {
"nonGlobalStepDefinitions": true
}
}CYPRESS.JSON
{
"testFiles" :"**/*.feature"
}发布于 2022-07-03 00:18:59
要运行user.feature,user.js步骤应该位于user文件夹中。
“柏树-黄瓜-预处理器”:"^4.3.1“是真正的老版本。
推荐“badeball/柏树-黄瓜-预处理器”:"^11.3.0“用于最新的bug修复,等等。
发布于 2022-10-25 10:01:34
根据文档,您必须添加以下代码的/plugins/index.js。
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
}https://stackoverflow.com/questions/72842762
复制相似问题