From b1e48675c1fefae2646fdce04d795fbead9131ef Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 25 Mar 2021 10:02:57 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/api/dto/definition/request/MsScenario.java | 2 +- .../api/dto/definition/request/MsTestElement.java | 6 +++--- .../dto/definition/request/controller/MsLoopController.java | 2 +- frontend/src/business/components/xpack | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java index 58b712a08e..7a3ec79943 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java @@ -138,7 +138,7 @@ public class MsScenario extends MsTestElement { // 场景变量和环境变量 Arguments arguments = arguments(config); if (arguments != null) { - tree.add(config.valueSupposeMock(arguments)); + tree.add(ParameterConfig.valueSupposeMock(arguments)); } this.addCsvDataSet(tree, variables,config); this.addCounter(tree, variables); diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsTestElement.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsTestElement.java index 1c80bbe352..5fa9333809 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsTestElement.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsTestElement.java @@ -288,13 +288,13 @@ public abstract class MsTestElement { if (MsTestElementConstants.LoopController.name().equals(parent.getType())) { MsLoopController loopController = (MsLoopController) parent; if (StringUtils.equals(loopController.getLoopType(), LoopConstants.WHILE.name()) && loopController.getWhileController() != null) { - return "While 循环-" + "${LoopCounterConfigXXX}"; + return "While 循环-" + "${MS_LOOP_CONTROLLER_CONFIG}"; } if (StringUtils.equals(loopController.getLoopType(), LoopConstants.FOREACH.name()) && loopController.getForEachController() != null) { - return "ForEach 循环-" + "${LoopCounterConfigXXX}"; + return "ForEach 循环-" + "${MS_LOOP_CONTROLLER_CONFIG}"; } if (StringUtils.equals(loopController.getLoopType(), LoopConstants.LOOP_COUNT.name()) && loopController.getCountController() != null) { - return "次数循环-" + "${LoopCounterConfigXXX}"; + return "次数循环-" + "${MS_LOOP_CONTROLLER_CONFIG}"; } } // 获取全路径以备后面使用 diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/controller/MsLoopController.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/controller/MsLoopController.java index b51c81997d..d525683aea 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/controller/MsLoopController.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/controller/MsLoopController.java @@ -87,7 +87,7 @@ public class MsLoopController extends MsTestElement { private CounterConfig addCounterConfig() { CounterConfig counterConfig = new CounterConfig(); - counterConfig.setVarName("LoopCounterConfigXXX"); + counterConfig.setVarName("MS_LOOP_CONTROLLER_CONFIG"); counterConfig.setName("数循结果统计计数器"); counterConfig.setEnabled(true); counterConfig.setProperty(TestElement.TEST_CLASS, CounterConfig.class.getName()); diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 2115bd28a9..07951ba17a 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 2115bd28a90854d2b6276a90878934715498c584 +Subproject commit 07951ba17aef6f29e50cfd68e40de3266f9a60cd