refactor(测试跟踪): 测试计划显示默认环境加过滤条件
https://www.tapd.cn/55049933/prong/stories/view/1155049933001010410 --user=郭雨琦
This commit is contained in:
parent
f7aa399ff9
commit
71279ea0bb
|
@ -670,7 +670,7 @@ public class TestPlanApiCaseService {
|
||||||
String caseId = testPlanApiCase.getApiCaseId();
|
String caseId = testPlanApiCase.getApiCaseId();
|
||||||
String envId = testPlanApiCase.getEnvironmentId();
|
String envId = testPlanApiCase.getEnvironmentId();
|
||||||
String projectId = projectCaseIdMap.get(caseId);
|
String projectId = projectCaseIdMap.get(caseId);
|
||||||
if (StringUtils.isNotBlank(projectId)) {
|
if (StringUtils.isNotBlank(projectId) && StringUtils.isNotBlank(envId)) {
|
||||||
if (envMap.containsKey(projectId)) {
|
if (envMap.containsKey(projectId)) {
|
||||||
List<String> list = envMap.get(projectId);
|
List<String> list = envMap.get(projectId);
|
||||||
if (!list.contains(envId)) {
|
if (!list.contains(envId)) {
|
||||||
|
@ -682,6 +682,7 @@ public class TestPlanApiCaseService {
|
||||||
envMap.put(projectId, envs);
|
envMap.put(projectId, envs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return envMap;
|
return envMap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1499,11 +1499,15 @@ public class TestPlanService {
|
||||||
.flatMap(Collection::stream)
|
.flatMap(Collection::stream)
|
||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
if (CollectionUtils.isNotEmpty(result)){
|
||||||
envMap.put(projectId, result);
|
envMap.put(projectId, result);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (CollectionUtils.isNotEmpty(scenarioEnv.get(projectId))){
|
||||||
envMap.put(projectId, scenarioEnv.get(projectId));
|
envMap.put(projectId, scenarioEnv.get(projectId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return envMap;
|
return envMap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,12 +162,12 @@
|
||||||
<el-dropdown @command="handleCommand" style="margin-left: 5px">
|
<el-dropdown @command="handleCommand" style="margin-left: 5px">
|
||||||
<el-button type="primary">
|
<el-button type="primary">
|
||||||
{{
|
{{
|
||||||
$t("commons.run")
|
$t("api_test.run")
|
||||||
}}<i class="el-icon-arrow-down el-icon--right"></i>
|
}}<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="run">{{
|
<el-dropdown-item command="run">{{
|
||||||
$t("commons.run")
|
$t("api_test.run")
|
||||||
}}
|
}}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item command="runAndSave">{{
|
<el-dropdown-item command="runAndSave">{{
|
||||||
|
|
Loading…
Reference in New Issue