fix(接口定义): 修复场景不提示跨项目用例未选择环境的缺陷

This commit is contained in:
wxg0103 2023-01-12 12:24:05 +08:00 committed by wxg0103
parent 02feb6893e
commit 94938efde6
2 changed files with 4 additions and 12 deletions

View File

@ -74,14 +74,11 @@ public class ApiScenarioEnvService {
List<Boolean> hasFullUrlList = new ArrayList<>();
for (MsTestElement testElement : hashTree) {
this.formatElement(testElement, env, hasFullUrlList);
if (CollectionUtils.isNotEmpty(testElement.getHashTree()) && !hasFullUrlList.contains(false)) {
if (CollectionUtils.isNotEmpty(testElement.getHashTree())) {
getHashTree(testElement.getHashTree(), env, hasFullUrlList);
}
if (hasFullUrlList.contains(false)) {
env.setFullUrl(false);
break;
}
}
env.setFullUrl(!hasFullUrlList.contains(false));
return env;
}
@ -92,12 +89,9 @@ public class ApiScenarioEnvService {
tree = tree.stream().filter(item -> item.isEnable()).collect(Collectors.toList());
for (MsTestElement element : tree) {
this.formatElement(element, env, hasFullUrlList);
if (CollectionUtils.isNotEmpty(element.getHashTree()) && !hasFullUrlList.contains(false)) {
if (CollectionUtils.isNotEmpty(element.getHashTree())) {
getHashTree(element.getHashTree(), env, hasFullUrlList);
}
if (hasFullUrlList.contains(false)) {
break;
}
}
} catch (Exception e) {
LogUtil.error(e);

View File

@ -593,9 +593,7 @@ export default {
// websock
// websock
this.$refs.apiCaseResult.open(reportId);
setTimeout(() => {
run(row.id, reportId);
}, 3000);
run(row.id, reportId);
},
handleTestEnd(reportId) {
if (this.runningReport.has(reportId)) {