目前正在将量角器项目移至FE Angular项目中。
现在想设置用于在不同环境下运行测试的命令 但不幸的是,这一切都没有实现。
测试位于./e2e中 环境位于./src/environments中: environment.dev.ts environment.state.ts
"project-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "protractor.conf.js",
"devServerTarget": "project:serve"
},
"configurations": {
"production": {
"devServerTarget": "project:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
我想配置包json和angular.json,以便根据以下命令在env中运行测试: npm运行e2e:dev npm运行e2e:stage
我尝试添加baseUrl
"configurations": {
"production": {
"baseUrl": "hhtp://url"
}
}
并予以赞扬:
"e2e:dev": "protractor ./protractor.conf.js --configuration=dev",
但是它也不起作用。 感谢您的提前帮助。