From 8a61ad3e02fb32aa6f0ed941f3d9374cb106b50a Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Fri, 28 Oct 2022 12:05:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=9B=A0=E4=B8=BAmock=E6=9C=9F=E6=9C=9B=E4=B8=8D=E6=94=AF?= =?UTF-8?q?=E6=8C=81jmeter=E5=87=BD=E6=95=B0=E6=89=80=E4=BB=A5=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E8=BE=93=E5=85=A5=E6=A1=86=E4=B8=AD=E7=9A=84=E9=AB=98?= =?UTF-8?q?=E7=BA=A7=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1017964 --user=宋天阳 【接口测试】mock期望 - 响应体中的mock和jmeter函数不生效 https://www.tapd.cn/55049933/s/1281624 --- .../json-schema/schema/editor/main.vue | 1 + .../mock/Components/MockApiBody.vue | 4 ++-- .../mock/Components/MockRequestParam.vue | 10 +++++----- .../definition/components/mock/MockTab.vue | 20 ++++++++++--------- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/api-test/frontend/src/business/commons/json-schema/schema/editor/main.vue b/api-test/frontend/src/business/commons/json-schema/schema/editor/main.vue index 3aba426eef..737fb5a470 100644 --- a/api-test/frontend/src/business/commons/json-schema/schema/editor/main.vue +++ b/api-test/frontend/src/business/commons/json-schema/schema/editor/main.vue @@ -65,6 +65,7 @@ :deep="deep+1" :root="false" class="children" :scenario-definition="scenarioDefinition" :show-mock-vars="showMockVars" + :disabled="disabled" @editScenarioAdvance="editScenarioAdvance" :lang="lang" :custom="custom" @changeAllItemsType="changeAllItemsType"/> diff --git a/api-test/frontend/src/business/definition/components/mock/Components/MockApiBody.vue b/api-test/frontend/src/business/definition/components/mock/Components/MockApiBody.vue index ed5303ff22..3c50c65711 100644 --- a/api-test/frontend/src/business/definition/components/mock/Components/MockApiBody.vue +++ b/api-test/frontend/src/business/definition/components/mock/Components/MockApiBody.vue @@ -29,6 +29,7 @@ :is-read-only="isReadOnly" :is-show-enable="isShowEnable" :suggestions="suggestions" + :disable-variable-tip="true" :parameters="body.kvs"/>
@@ -78,8 +79,7 @@ import MsDropdown from "@/business/commons/MsDropdown"; import MsApiFromUrlVariable from "@/business/definition/components/body/ApiFromUrlVariable"; import BatchAddParameter from "@/business/definition/components/basis/BatchAddParameter"; import Convert from "@/business/commons/json-schema/convert/convert"; -import MockCombinationCondition - from "@/business/definition/components/mock/Components/MockCombinationCondition"; +import MockCombinationCondition from "@/business/definition/components/mock/Components/MockCombinationCondition"; export default { name: "MockApiBody", diff --git a/api-test/frontend/src/business/definition/components/mock/Components/MockRequestParam.vue b/api-test/frontend/src/business/definition/components/mock/Components/MockRequestParam.vue index 506f75c0aa..3faaba5894 100644 --- a/api-test/frontend/src/business/definition/components/mock/Components/MockRequestParam.vue +++ b/api-test/frontend/src/business/definition/components/mock/Components/MockRequestParam.vue @@ -22,7 +22,7 @@ + :suggestions="headerSuggestions" :items="request.headers" :need-mock="false"/> @@ -41,6 +41,7 @@ @@ -62,6 +63,7 @@ @@ -104,12 +106,10 @@ import {hasLicense, hasPermission} from "metersphere-frontend/src/utils/permissi import BatchAddParameter from "@/business/definition/components/basis/BatchAddParameter"; import MsApiAdvancedConfig from "@/business/definition/components/request/http/ApiAdvancedConfig"; import MsJsr233Processor from "@/business/automation/scenario/component/Jsr233Processor"; -import ApiDefinitionStepButton - from "@/business/definition/components/request/components/ApiDefinitionStepButton"; +import ApiDefinitionStepButton from "@/business/definition/components/request/components/ApiDefinitionStepButton"; import Convert from "@/business/commons/json-schema/convert/convert"; import MockApiBody from "@/business/definition/components/mock/Components/MockApiBody"; -import MockCombinationCondition - from "@/business/definition/components/mock/Components/MockCombinationCondition"; +import MockCombinationCondition from "@/business/definition/components/mock/Components/MockCombinationCondition"; export default { name: "MockRequestParam", diff --git a/api-test/frontend/src/business/definition/components/mock/MockTab.vue b/api-test/frontend/src/business/definition/components/mock/MockTab.vue index 09d1042b7b..356c547f3f 100644 --- a/api-test/frontend/src/business/definition/components/mock/MockTab.vue +++ b/api-test/frontend/src/business/definition/components/mock/MockTab.vue @@ -5,14 +5,14 @@ {{ $t('project.version.name') }}: {{ versionName }}
- Mock地址: - - {{ this.getUrlPrefix }} - - 当前项目未开启Mock服务 - + Mock地址: + + {{ this.getUrlPrefix }} + + 当前项目未开启Mock服务 +