首页 > 解决方案 > Cypress - Cucumber 场景大纲

问题描述

我正在使用下面的功能文件:

cypress\integration\features\UI\LinksValidation.feature

场景大纲:链接验证

    Given Im on the application page
    When I launch the web "<url>"
    Then Verify if page loads fine

    Examples:
        | url |
        | https://sample.com|
        | https://sample1.com|

我的步骤定义文件如下所示:

When(/^I 启动网络 "(.*?)"$/, (url) => { cy.log(url) });

我也试过When("I launch the web {string}", (url) => { cy.log(url) });

两者都给出错误

堆栈跟踪:错误:无法遍历依赖关系图:无法从 D:\cypress_RS\node_modules\chokidar\lib\fsevents-handler.js 所需的“D:\cypress_RS\node_modules\chokidar\lib”中找到模块“fsevents”

糟糕...我们发现准备此测试文件时出错:cypress\integration\features\UI\LinksValidation.feature

在此处输入图像描述

标签: javascriptcucumbercypressgherkin

解决方案


推荐阅读