fix(场景自动化): 单步骤调试环境检查问题

This commit is contained in:
shiziyuan9527 2021-04-29 16:26:39 +08:00 committed by 刘瑞斌
parent a54be78b5e
commit 1f3f4ed11b
1 changed files with 7 additions and 5 deletions

View File

@ -309,13 +309,15 @@
run() {
if (this.isApiImport) {
if (this.request.type && (this.request.type === "HTTPSamplerProxy" || this.request.type === "JDBCSampler" || this.request.type === "TCPSampler")) {
this.$warning("请在环境配置中为该步骤所属项目选择运行环境!");
return false;
} else if (this.envMap && this.envMap.size > 0) {
const env = this.envMap.get(this.request.projectId);
if (!env) {
if (!this.envMap || this.envMap.size === 0) {
this.$warning("请在环境配置中为该步骤所属项目选择运行环境!");
return false;
} else if (this.envMap && this.envMap.size > 0) {
const env = this.envMap.get(this.request.projectId);
if (!env) {
this.$warning("请在环境配置中为该步骤所属项目选择运行环境!");
return false;
}
}
}
}