fix(TCP-Mock): #1006121 【接口测试】tcp接口的mock期望切换后内容没变;#1006127 【接口测试】tcp同时开两个接口,点【mock设置】按钮会串

【【接口测试】tcp同时开两个接口,点【mock设置】按钮会串】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001006127;测试计划批量执行、定时任务、Jenkins调用时报告模板更新;【【接口测试】tcp同时开两个接口,点【mock设置】按钮会串】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001006127
This commit is contained in:
song-tianyang 2021-08-24 19:00:53 +08:00 committed by 刘瑞斌
parent 30c2b2e8db
commit b913e2b804
3 changed files with 29 additions and 14 deletions

View File

@ -340,6 +340,7 @@ export default {
});
},
clickRow(row, column, event) {
this.cleanMockExpectConfig();
let selectUrl = "/mockConfig/mockExpectConfig/" + row.id;
this.$get(selectUrl, response => {
let data = response.data;

View File

@ -82,11 +82,11 @@
<el-col>{{ $t('api_test.mock.rsp_param') }}</el-col>
</el-row>
<el-row>
<el-form-item label="延时 (ms)" prop="response.delayed">
<el-input-number v-model="mockExpectConfig.response.delayed" :min="0">
<template slot="append">ms</template>
</el-input-number>
</el-form-item>
<el-form-item label="延时 (ms)" prop="response.delayed">
<el-input-number v-model="mockExpectConfig.response.delayed" :min="0">
<template slot="append">ms</template>
</el-input-number>
</el-form-item>
</el-row>
<el-row style="margin-top: 10px;">
<el-form-item label="Body:" label-width="50px">
@ -153,8 +153,10 @@ export default {
name: "",
mockConfigId: "",
request: {
reportType:'raw',
xmlDataStruct:[],
reportType: 'raw',
xmlDataStruct: [],
jsonDataStruct: "",
rawDataStruct: "",
},
response: {
httpCode: "",
@ -177,7 +179,7 @@ export default {
},
props: {
baseMockConfigData: {},
type:String
type: String
},
created() {
this.mockConfigData = this.baseMockConfigData;
@ -252,8 +254,10 @@ export default {
name: "",
mockConfigId: "",
request: {
reportType:'raw',
xmlDataStruct:[],
reportType: 'raw',
xmlDataStruct: [],
jsonDataStruct: "",
rawDataStruct: "",
},
response: {
httpCode: "",
@ -263,6 +267,7 @@ export default {
},
};
this.$nextTick(function () {
this.$refs.tcpParam.reload();
this.showHeadTable = true;
});
},
@ -310,6 +315,7 @@ export default {
});
},
clickRow(row, column, event) {
this.cleanMockExpectConfig();
let selectUrl = "/mockConfig/mockExpectConfig/" + row.id;
this.$get(selectUrl, response => {
let data = response.data;
@ -317,8 +323,8 @@ export default {
this.mockExpectConfig = data;
if (this.mockExpectConfig.request == null) {
this.mockExpectConfig.request = {
reportType:'raw',
xmlDataStruct:[],
reportType: 'raw',
xmlDataStruct: [],
};
}
if (this.mockExpectConfig.response == null) {

View File

@ -1,6 +1,6 @@
<template>
<div>
<el-row>
<el-row v-if="!isReloadData">
<el-radio-group v-model="request.reportType" size="mini" style="margin: 10px 0px;">
<el-radio :disabled="isReadOnly" label="json" @change="changeReportType">
json
@ -89,12 +89,20 @@ export default {
isReloadData: false,
refreshedXmlTable:true,
currentProjectId: "",
rawDataStruct: "",
jsonDataStruct: "",
}
},
watch:{
reportType(){
this.request.reportType = this.reportType;
}
},
'request.rawDataStruct'(){
this.reload();
},
'request.jsonDataStruct'(){
this.reload();
},
},
created() {
this.currentProjectId = getCurrentProjectID();