Automated tests 如何解决柏树黄瓜';缺少以下步骤的实施:';错误?

Automated tests 如何解决柏树黄瓜';缺少以下步骤的实施:';错误?,automated-tests,cucumber,cypress,bdd,Automated Tests,Cucumber,Cypress,Bdd,我已设立柏树黄瓜项目如下: 我在package-lock.json中添加了“nonGlobalStepDefinitions”:true,但仍然找不到步骤 package-lock.json: 功能文件: 步骤定义文件: 目录结构: 错误日志: 测试主体 1. 什么时候 转到AB站点 2. 然后 {},函数(){} 错误 缺少步骤实现:转到AB站点 node_modules/cypress cumber preprocessor/lib/resolveStepDefinition.j

我已设立柏树黄瓜项目如下:

我在package-lock.json中添加了“nonGlobalStepDefinitions”:true,但仍然找不到步骤

package-lock.json:

功能文件:

步骤定义文件:

目录结构:

错误日志:

测试主体
1.
什么时候
转到AB站点
2.
然后
{},函数(){}
错误
缺少步骤实现:转到AB站点
node_modules/cypress cumber preprocessor/lib/resolveStepDefinition.js:195:1
193 |       );
194 |     }
>195 |抛出新错误(${stepText}`缺少步骤实现);
| ^
196 |   },
197 |给定:(…args)=>{
198 | stepDefinitionRegistry.runtime(…args);
堆栈:
在Context.resolveAndRunStepDefinition(node_modules/cypress cucumber preprocessor/lib/resolvestefinition.js:195:1)
在Context.eval(节点_模块/cypress)-
预处理器/lib/createTestFromScenario.js:26:1)
从以前的事件:
在Context.thenFn(http://localhost:33867/__cypress/runner/cypress_runner.js:155135:24)
那么(http://localhost:33867/__cypress/runner/cypress_runner.js:155574:22)
在上下文中(http://localhost:33867/__cypress/runner/cypress_runner.js:169891:22)
在(http://localhost:33867/__cypress/runner/cypress_runner.js:169315:16)
从以前的事件:
按命令(http://localhost:33867/__cypress/runner/cypress_runner.js:169294:9)
接下来(http://localhost:33867/__cypress/runner/cypress_runner.js:169440:15)
在(http://localhost:33867/__cypress/runner/cypress_runner.js:169468:17)
从以前的事件:
接下来(http://localhost:33867/__cypress/runner/cypress_runner.js:169440:35)
从以前的事件:
at Promise.catch.err.name(http://localhost:33867/__cypress/runner/cypress_runner.js:169481:38)
从以前的事件:
在逃(http://localhost:33867/__cypress/runner/cypress_runner.js:169474:22)
价格为$Cy.Cy.[当时](http://localhost:33867/__cypress/runner/cypress_runner.js:169931:12)
位于Context.runnable.fn(http://localhost:33867/__cypress/runner/cypress_runner.js:170155:22)
在callFn(http://localhost:33867/__cypress/runner/cypress_runner.js:104227:22)
在测试时…/driver/node_modules/mocha/lib/runnable.js.runnable.run(http://localhost:33867/__cypress/runner/cypress_runner.js:104214:8)
在(http://localhost:33867/__cypress/runner/cypress_runner.js:175754:29)
从以前的事件:
在Object.onRunnableRun(http://localhost:33867/__cypress/runner/cypress_runner.js:175742:18)
售价$Cypress.action(http://localhost:33867/__cypress/runner/cypress_runner.js:166291:29)
在Test.Runnable.run(http://localhost:33867/__cypress/runner/cypress_runner.js:174128:14)
在Runner…/driver/node_modules/mocha/lib/Runner.js.Runner.runTest(http://localhost:33867/__cypress/runner/cypress_runner.js:104886:11)
在(http://localhost:33867/__cypress/runner/cypress_runner.js:105012:13)
接下来(http://localhost:33867/__cypress/runner/cypress_runner.js:104795:15)
在(http://localhost:33867/__cypress/runner/cypress_runner.js:104805:8)
接下来(http://localhost:33867/__cypress/runner/cypress_runner.js:104707:15)
胡克(http://localhost:33867/__cypress/runner/cypress_runner.js:104768:8)
接下来(http://localhost:33867/__cypress/runner/cypress_runner.js:175675:23)
在(http://localhost:33867/__cypress/runner/cypress_runner.js:175697:12)
从以前的事件:
在onNext(http://localhost:33867/__cypress/runner/cypress_runner.js:175694:58)
完成(http://localhost:33867/__cypress/runner/cypress_runner.js:104167:6)
在callFn(http://localhost:33867/__cypress/runner/cypress_runner.js:104250:8)
在Hook…/driver/node_modules/mocha/lib/runnable.js.runnable.run(http://localhost:33867/__cypress/runner/cypress_runner.js:104214:8)
在(http://localhost:33867/__cypress/runner/cypress_runner.js:175754:29)
从以前的事件:
在Object.onRunnableRun(http://localhost:33867/__cypress/runner/cypress_runner.js:175742:18)
售价$Cypress.action(http://localhost:33867/__cypress/runner/cypress_runner.js:166291:29)
在Hook.Runnable.run(http://localhost:33867/__cypress/runner/cypress_runner.js:174128:14)
接下来(http://localhost:33867/__cypress/runner/cypress_runner.js:104729:11)
在(http://localhost:33867/__cypress/runner/cypress_runner.js:104773:6)
时间片(http://localhost:33867/__cypress/runner/cypress_runner.js:98699:28)
TEST BODY
1
When
go to AB site
2
then
{}, function(){}
Error
Step implementation missing for: go to AB site
node_modules/cypress-cucumber-preprocessor/lib/resolveStepDefinition.js:195:1
  193 |       );
  194 |     }
> 195 |     throw new Error(`Step implementation missing for: ${stepText}`);
      | ^
  196 |   },
  197 |   Given: (...args) => {
  198 |     stepDefinitionRegistry.runtime(...args);


Stack:

  at Context.resolveAndRunStepDefinition (node_modules/cypress-cucumber-preprocessor/lib/resolveStepDefinition.js:195:1)
at Context.eval (node_modules/cypress-cucumber-

preprocessor/lib/createTestFromScenario.js:26:1)
From previous event:
    at Context.thenFn (http://localhost:33867/__cypress/runner/cypress_runner.js:155135:24)
    at Context.then (http://localhost:33867/__cypress/runner/cypress_runner.js:155574:22)
    at Context.<anonymous> (http://localhost:33867/__cypress/runner/cypress_runner.js:169891:22)
    at <unknown> (http://localhost:33867/__cypress/runner/cypress_runner.js:169315:16)
From previous event:
    at runCommand (http://localhost:33867/__cypress/runner/cypress_runner.js:169294:9)
    at next (http://localhost:33867/__cypress/runner/cypress_runner.js:169440:15)
    at <unknown> (http://localhost:33867/__cypress/runner/cypress_runner.js:169468:17)
From previous event:
    at next (http://localhost:33867/__cypress/runner/cypress_runner.js:169440:35)
From previous event:
    at Promise.catch.err.name (http://localhost:33867/__cypress/runner/cypress_runner.js:169481:38)
From previous event:
    at run (http://localhost:33867/__cypress/runner/cypress_runner.js:169474:22)
    at $Cy.cy.<computed> [as then] (http://localhost:33867/__cypress/runner/cypress_runner.js:169931:12)
    at Context.runnable.fn (http://localhost:33867/__cypress/runner/cypress_runner.js:170155:22)
    at callFn (http://localhost:33867/__cypress/runner/cypress_runner.js:104227:22)
    at Test.../driver/node_modules/mocha/lib/runnable.js.Runnable.run (http://localhost:33867/__cypress/runner/cypress_runner.js:104214:8)
    at <unknown> (http://localhost:33867/__cypress/runner/cypress_runner.js:175754:29)
From previous event:
    at Object.onRunnableRun (http://localhost:33867/__cypress/runner/cypress_runner.js:175742:18)
    at $Cypress.action (http://localhost:33867/__cypress/runner/cypress_runner.js:166291:29)
    at Test.Runnable.run (http://localhost:33867/__cypress/runner/cypress_runner.js:174128:14)
    at Runner.../driver/node_modules/mocha/lib/runner.js.Runner.runTest (http://localhost:33867/__cypress/runner/cypress_runner.js:104886:11)
    at <unknown> (http://localhost:33867/__cypress/runner/cypress_runner.js:105012:13)
    at next (http://localhost:33867/__cypress/runner/cypress_runner.js:104795:15)
    at <unknown> (http://localhost:33867/__cypress/runner/cypress_runner.js:104805:8)
    at next (http://localhost:33867/__cypress/runner/cypress_runner.js:104707:15)
    at Hook.<anonymous> (http://localhost:33867/__cypress/runner/cypress_runner.js:104768:8)
    at next (http://localhost:33867/__cypress/runner/cypress_runner.js:175675:23)
    at <unknown> (http://localhost:33867/__cypress/runner/cypress_runner.js:175697:12)
From previous event:
    at onNext (http://localhost:33867/__cypress/runner/cypress_runner.js:175694:58)
    at done (http://localhost:33867/__cypress/runner/cypress_runner.js:104167:6)
    at callFn (http://localhost:33867/__cypress/runner/cypress_runner.js:104250:8)
    at Hook.../driver/node_modules/mocha/lib/runnable.js.Runnable.run (http://localhost:33867/__cypress/runner/cypress_runner.js:104214:8)
    at <unknown> (http://localhost:33867/__cypress/runner/cypress_runner.js:175754:29)
From previous event:
    at Object.onRunnableRun (http://localhost:33867/__cypress/runner/cypress_runner.js:175742:18)
    at $Cypress.action (http://localhost:33867/__cypress/runner/cypress_runner.js:166291:29)
    at Hook.Runnable.run (http://localhost:33867/__cypress/runner/cypress_runner.js:174128:14)
    at next (http://localhost:33867/__cypress/runner/cypress_runner.js:104729:11)
    at <unknown> (http://localhost:33867/__cypress/runner/cypress_runner.js:104773:6)
    at timeslice (http://localhost:33867/__cypress/runner/cypress_runner.js:98699:28)