fix(接口测试): 因为mock期望不支持jmeter函数所以取消输入框中的高级设置

--bug=1017964 --user=宋天阳 【接口测试】mock期望 -
响应体中的mock和jmeter函数不生效
https://www.tapd.cn/55049933/s/1281624
This commit is contained in:
song-tianyang 2022-10-28 12:05:49 +08:00 committed by 建国
parent 9fe7ad5fec
commit a0b1cd12b9
4 changed files with 19 additions and 16 deletions

View File

@ -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"/>
</template>

View File

@ -29,6 +29,7 @@
:is-read-only="isReadOnly"
:is-show-enable="isShowEnable"
:suggestions="suggestions"
:disable-variable-tip="true"
:parameters="body.kvs"/>
</div>
<div v-if="body.type == 'JSON'">
@ -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",

View File

@ -22,7 +22,7 @@
</el-row>
<ms-api-key-value :append-to-body="true" :show-desc="true" :is-read-only="isReadOnly"
:isShowEnable="isShowEnable"
:suggestions="headerSuggestions" :items="request.headers" :need-mock="true"/>
:suggestions="headerSuggestions" :items="request.headers" :need-mock="false"/>
</el-tab-pane>
<!--query 参数-->
@ -41,6 +41,7 @@
</el-row>
<mock-combination-condition :filter-type-object="request" :is-read-only="isReadOnly"
:is-show-enable="isShowEnable" :suggestions="apiParams.query"
:disable-variable-tip="true"
:parameters="request.arguments"/>
</el-tab-pane>
@ -62,6 +63,7 @@
</el-row>
<mock-combination-condition :is-rest="true" :filter-type-object="request" :is-read-only="isReadOnly"
:is-show-enable="isShowEnable" :suggestions="apiParams.rest"
:disable-variable-tip="true"
:parameters="request.rest"/>
</el-tab-pane>
@ -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",

View File

@ -5,14 +5,14 @@
{{ $t('project.version.name') }}: {{ versionName }}
</div>
<div style="float: left;margin-top: 15px">
Mock地址
<el-link v-if="this.getUrlPrefix !== '' " :href="getUrlPrefix" style="color: black" target="_blank"
type="primary">
<span>{{ this.getUrlPrefix }}</span>
</el-link>
<el-link v-else style="color: darkred" target="_blank"
type="primary">当前项目未开启Mock服务
</el-link>
Mock地址
<el-link v-if="this.getUrlPrefix !== '' " :href="getUrlPrefix" style="color: black" target="_blank"
type="primary">
<span>{{ this.getUrlPrefix }}</span>
</el-link>
<el-link v-else style="color: darkred" target="_blank"
type="primary">当前项目未开启Mock服务
</el-link>
</div>
<el-input :placeholder="$t('commons.search_by_name')" class="search-input" size="small"
:clearable="true"
@ -167,7 +167,9 @@ export default {
}
},
created() {
this.mockConfigData = this.baseMockConfigData;
if (this.baseMockConfigData) {
this.mockConfigData = this.baseMockConfigData;
}
this.checkVersionEnable();
this.initMockEnvironment();
},