小编0kM*_*ike的帖子

Angular 中的 Cypress 和 Cucumber > 流程未定义

我尝试使用 Cypress 在 Angular 12 项目中使用 Cucumber 和 TypeScript 进行 e2e 测试。

Cypress 本身通过以下方式成功启动npx cypress open,并显示了我创建的功能文件: 带有自定义功能文件的 cypress

当我开始测试此功能时,我收到以下错误: 赛普拉斯浏览器错误

我在这里发现了类似的问题,但没有可以应用的解决方案。我相信发生此错误是因为我使用的是 cypress 自己的浏览器,并且进程变量在那里不可用。我也查看了这个存储库,但未能找到任何可以解决此问题的内容。

该项目的package.json如下所示:

{   "name": "randomAppName",   "version": "0.0.0",   "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test",
    "i18n": "ng extract-i18n --output-path src/assets/i18n",
    "lint": "eslint . --ext .ts,.js",
    "lint-fix": "eslint . --ext .ts,.js"   },   "private": true,   "dependencies": {
    "@angular/animations": "~12.2.0",
    "@angular/cdk": "^12.2.5",
    "@angular/common": "~12.2.0",
    "@angular/compiler": "~12.2.0",
    "@angular/core": "~12.2.0", …
Run Code Online (Sandbox Code Playgroud)

cucumber typescript angular cypress

3
推荐指数
1
解决办法
1991
查看次数

标签 统计

angular ×1

cucumber ×1

cypress ×1

typescript ×1