fix(接口测试): 场景批量添加到测试计划前环境检查

This commit is contained in:
shiziyuan9527 2021-12-23 18:30:14 +08:00 committed by 刘瑞斌
parent c4462803d9
commit 4b2ca3eec2
1 changed files with 7 additions and 0 deletions

View File

@ -241,6 +241,13 @@ export default {
if (!sign) {
return false;
}
if (this.environmentType === ENV_TYPE.JSON && (!this.projectEnvMap || this.projectEnvMap.size < 1)) {
this.$warning(this.$t("api_test.environment.select_environment"));
return false;
} else if (this.environmentType === ENV_TYPE.GROUP && !this.envGroupId) {
this.$warning(this.$t("api_test.environment.select_environment"));
return false;
}
this.$emit('addTestPlan', this.selection, this.projectEnvMap, this.map, this.environmentType, this.envGroupId);
}
},