抱歉,這是一個明顯的問題,我似乎無法弄清楚。
我正在使用柏樹和黃瓜來創建我的測驗。我的檔案結構看起來像這樣

我想要做的是在assertionStepDifinition.js檔案中添加可以在我login.feature和我的register.feature
這是我的cypress.json
{
"chromeWebSecurity": false,
"failOnStatusCode": false,
"defaultCommandTimeout": 60000,
"testFiles": "**/*.feature"
}
目前我收到錯誤 Step implementation missing for: I am at the login page
提前致謝!
uj5u.com熱心網友回復:
很可能您需要添加到您的package.json
"cypress-cucumber-preprocessor": {
"step_definitions": "cypress/integration/**/"
}
uj5u.com熱心網友回復:
您可以像這樣添加步驟定義檔案所在的直接路徑package.json:
"cypress-cucumber-preprocessor": {
"nonGlobalStepDefinitions": false,
"stepDefinitions": "cypress/integration/cucumber-test/"
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/461175.html
