我看到这个问题的许多例子,但没有任何帮助我。如果这个问题无聊的话,我很抱歉。
我刚开始使用node.js,Cypress和GitLab管道。
我拼凑了一个简单的web应用程序,一些简单的测试。它第一次运行良好,但在后续提交时,它在“Cypress测试”步骤中失败,使用:The cypress npm package is installed, but the Cypress binary is missing.
日志上还有很多东西,但我不知道什么是相关的。
这是我的yml文件
cypress tests:
stage: test
image: cypress/browsers:node14.17.0-chrome91-ff89
cache:
key: package-lock.json
paths:
- node_modules
before_script:
- npm install
- npm run dev &
- ./node_modules/.bin/wait-on http://localhost:3000
script:
- npm run cypress
only:
- merge_requests
- master
你能帮我处理一下看起来可能是罪魁祸首的东西吗?或者至少帮助我更好地理解情况?我试着尽可能多地阅读文档,只是看不出正确的方向。
发布于 2022-10-06 02:24:52
我也是初学者,但我想回答。首先,可以将"cypress:open" : "cypress open"
添加到文件package.json中。有关更多详细信息,您可以观看此视频
https://stackoverflow.com/questions/73892862
复制相似问题