【问题标题】:Is there a way to disable Component Testing feature in cypress 10.x and above有没有办法在 cypress 10.x 及更高版本中禁用组件测试功能
【发布时间】:2023-01-19 22:27:19
【问题描述】:

我们不使用 Cypress 中的组件测试功能,该功能是在 10.x 及更高版本中引入的。每次我们进入测试运行器之前关闭它是一个额外的负担。

【问题讨论】:

    标签: cypress cypress-component-test-runner


    【解决方案1】:

    通过命令行运行 Cypress 时,您可以使用 the --e2e flag 直接启动到端到端测试套件。假设您使用的是npm,那将是:

    npx cypress open --e2e
    

    如果您有一个存储脚本的 package.json 文件,您也可以修改该脚本。

    ...
    "cypress:open": "npx cypress open --e2e",
    ...
    npm run cypress:open
    

    【讨论】:

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