From 8f7097aed53794395fc1212ae9f94db63ddc9fb3 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 23 May 2023 17:17:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=85=A5=E5=9C=BA=E6=99=AF=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E8=A2=AB=E5=BC=95=E7=94=A8=E7=9A=84=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=98=BE=E7=A4=BA=E6=96=B0=E7=9A=84=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E5=85=B3=E7=B3=BB=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1026414 --user=王孝刚 【接口测试】导入场景后,被引用的场景没有显示新的引用关系 https://www.tapd.cn/55049933/s/1374632 --bug=1026433 --user=王孝刚 【接口自动化】场景-全屏编辑-执行请求-状态一直是测试中无法停止 https://www.tapd.cn/55049933/s/1374636 --- .../service/scenario/ApiScenarioReferenceIdService.java | 9 +++++++++ .../src/business/automation/scenario/EditApiScenario.vue | 3 +++ .../automation/scenario/maximize/MaximizeScenario.vue | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReferenceIdService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReferenceIdService.java index a7446ef0e9..51f21e91af 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReferenceIdService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReferenceIdService.java @@ -81,6 +81,15 @@ public class ApiScenarioReferenceIdService { for (int index = 0; index < hashTree.length(); index++) { JSONObject item = hashTree.optJSONObject(index); if (item == null || StringUtils.equals(item.optString(PropertyConstant.TYPE), ElementConstants.SCENARIO)) { + ApiScenarioReferenceId saveItem = new ApiScenarioReferenceId(); + saveItem.setId(UUID.randomUUID().toString()); + saveItem.setApiScenarioId(scenario.getId()); + saveItem.setReferenceId(item.optString(MsHashTreeService.ID)); + saveItem.setReferenceType(item.optString(MsHashTreeService.REFERENCED)); + saveItem.setDataType(item.optString(MsHashTreeService.REF_TYPE)); + saveItem.setCreateTime(System.currentTimeMillis()); + saveItem.setCreateUserId(SessionUtils.getUserId()); + returnList.add(saveItem); continue; } diff --git a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue index 9501bbe7ae..156657cb9b 100644 --- a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue +++ b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue @@ -1278,6 +1278,9 @@ export default { this.stopDebug = 'stop'; this.messageWebSocket.close(); this.reload(); + if (this.$refs.maximizeScenario) { + this.$refs.maximizeScenario.reload(); + } } }, handleCommand() { diff --git a/api-test/frontend/src/business/automation/scenario/maximize/MaximizeScenario.vue b/api-test/frontend/src/business/automation/scenario/maximize/MaximizeScenario.vue index 69114dd26c..990ef244d1 100644 --- a/api-test/frontend/src/business/automation/scenario/maximize/MaximizeScenario.vue +++ b/api-test/frontend/src/business/automation/scenario/maximize/MaximizeScenario.vue @@ -222,6 +222,8 @@ @suggestClick="suggestClick" @refReload="refReload" @openScenario="openScenario" + @runScenario="runScenario" + @stopScenario="stopScenario" v-if="selectedTreeNode && selectedNode" />