mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 20:19:16 +08:00
fix(接口定义): 修复场景不提示跨项目用例未选择环境的缺陷
This commit is contained in:
parent
02feb6893e
commit
94938efde6
@ -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);
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user