fix(测试计划): 修复批量修改环境的问题
--bug=1041660 --user=王孝刚 【测试跟踪】github#引用其他项目的用例,在选择变量的时候 要求选择当前项目及引用项目的环境配置,还是必选 https://www.tapd.cn/55049933/s/1525674
This commit is contained in:
parent
33f465ede0
commit
2f43a7882b
|
@ -493,7 +493,9 @@ public class TestPlanScenarioCaseService {
|
|||
if (envMap != null && !envMap.isEmpty()) {
|
||||
List<String> list = mapping.get(id);
|
||||
list.forEach(l -> {
|
||||
newEnvMap.put(l, envMap.get(l));
|
||||
if (envMap.containsKey(l) && StringUtils.isNotBlank(envMap.get(l))) {
|
||||
newEnvMap.put(l, envMap.get(l));
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!newEnvMap.isEmpty()) {
|
||||
|
|
|
@ -160,23 +160,19 @@ export default {
|
|||
},
|
||||
handleConfirm() {
|
||||
let map = new Map();
|
||||
let sign = true;
|
||||
let projectEnvDesc = {};
|
||||
let selectEnv = this.data.filter((dt) => dt.selectEnv);
|
||||
if (selectEnv.length === 0) {
|
||||
this.$warning("请为当前场景选择一个运行环境!");
|
||||
return false;
|
||||
}
|
||||
this.data.forEach((dt) => {
|
||||
if (!dt.selectEnv) {
|
||||
sign = false;
|
||||
return;
|
||||
}
|
||||
map.set(dt.id, dt.selectEnv);
|
||||
let filteredEnv = dt.envs.filter((e) => e.id === dt.selectEnv);
|
||||
if (filteredEnv.length > 0) {
|
||||
projectEnvDesc[this.getProjectName(dt.id)] = filteredEnv[0].name;
|
||||
}
|
||||
});
|
||||
if (!sign) {
|
||||
this.$warning("请为当前场景选择一个运行环境!");
|
||||
return;
|
||||
}
|
||||
this.$emit("setProjectEnvMap", map, projectEnvDesc);
|
||||
this.$emit("close");
|
||||
},
|
||||
|
@ -199,15 +195,8 @@ export default {
|
|||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
sign = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!sign) {
|
||||
this.$warning("请为当前场景选择一个运行环境!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
environmentConfigClose() {
|
||||
|
|
Loading…
Reference in New Issue