From c9708dec81ea3f95df590df81ac0a65befeb58dd Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 6 Dec 2022 10:49:59 +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=BC=95=E7=94=A8=E7=9A=84=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E7=9A=84=E6=97=B6=E5=80=99=E6=9C=AA=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=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=1019923 --user=王孝刚 【接口测试】场景引用带控制器的场景,控制器里的步骤没执行,并且再次打开场景后,控制器是禁用的 {#_orginal_url#} --- .../io/metersphere/api/dto/definition/request/MsScenario.java | 2 +- .../business/automation/scenario/component/LoopController.vue | 2 +- .../automation/scenario/component/TransactionController.vue | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java b/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java index 2937ff1260..0b422adfe5 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java +++ b/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java @@ -230,7 +230,7 @@ public class MsScenario extends MsTestElement { orgJSONArray.forEach(obj -> { JSONObject orgJsonObject = (JSONObject) obj; hashTree.forEach(targetObj -> { - if (StringUtils.equals(orgJsonObject.optString(MsHashTreeService.ID), targetObj.getId())) { + if (StringUtils.equals(orgJsonObject.optString(MsHashTreeService.RESOURCE_ID), targetObj.getResourceId())) { setRefEnable(targetObj, orgJsonObject); } }); diff --git a/api-test/frontend/src/business/automation/scenario/component/LoopController.vue b/api-test/frontend/src/business/automation/scenario/component/LoopController.vue index 2bb8696dad..31329bb3be 100644 --- a/api-test/frontend/src/business/automation/scenario/component/LoopController.vue +++ b/api-test/frontend/src/business/automation/scenario/component/LoopController.vue @@ -328,7 +328,7 @@ export default { debugCode(data) { if (data && this.node && this.node.data) { if (data.error > 0) { - this.node.data.code = 'error'; + this.node.data.code = 'Error'; } else { this.node.data.code = this.node.data.code !== 'ERROR' ? 'Success' : 'Error'; } diff --git a/api-test/frontend/src/business/automation/scenario/component/TransactionController.vue b/api-test/frontend/src/business/automation/scenario/component/TransactionController.vue index c595a12b92..62f44768f1 100644 --- a/api-test/frontend/src/business/automation/scenario/component/TransactionController.vue +++ b/api-test/frontend/src/business/automation/scenario/component/TransactionController.vue @@ -133,9 +133,9 @@ export default { getCode() { if (this.node && this.node.data.code && this.node.data.debug) { if (this.node.data.code && this.node.data.code === 'ERROR') { - return 'error'; + return 'Error'; } else { - return 'success'; + return 'Success'; } } return '';