fix(接口测试): 修复接口测试在执行时另存为新用例后切换tab页用例抽屉不会关闭的问题

--bug=1010452 --user=宋天阳 【接口测试】接口test-另存为新用例后,切换tab页,用例不会关闭
https://www.tapd.cn/55049933/s/1107510
This commit is contained in:
song-tianyang 2022-02-22 14:30:58 +08:00 committed by 刘瑞斌
parent 89f9c2603e
commit 011cb75cc6
3 changed files with 18 additions and 4 deletions

View File

@ -273,8 +273,13 @@ export default {
this.reload();
},
changeTab(tabType) {
this.beforeChangeTab();
this.refreshButtonActiveClass(tabType);
},
beforeChangeTab(){
//
this.$refs.caseList.close();
},
redirectToTest(param) {
this.refreshButtonActiveClass("test");
this.$nextTick(() => {

View File

@ -132,6 +132,11 @@ export default {
this.maintainerOptions = response.data;
});
},
close(){
if(this.$refs.testCaseDrawer){
this.$refs.testCaseDrawer.close();
}
},
open(api, testCaseId) {
this.api = api;
// testCaseId

View File

@ -32,7 +32,9 @@
<p class="tip">{{ $t('api_test.mock.rsp_param') }}</p>
</el-col>
<el-col :span="12">
<el-button class="ms-right-buttion" size="small" @click="addPostScript">+{{$t('api_test.definition.request.post_script')}}</el-button>
<el-button class="ms-right-buttion" size="small" @click="addPostScript">
+{{ $t('api_test.definition.request.post_script') }}
</el-button>
</el-col>
</el-row>
<el-row>
@ -131,7 +133,7 @@ export default {
},
computed: {},
methods: {
addPostScript(){
addPostScript() {
this.$refs.mockResponseParam.setUsePostScript();
},
uuid: function () {
@ -212,13 +214,15 @@ export default {
}
}
this.showDrawer = true;
this.$refs.mockDrawer.setfullScreen();
this.$nextTick(() => {
this.$refs.mockDrawer.setfullScreen();
});
},
close() {
this.showDrawer = false;
},
saveMockExpectConfig() {
if(this.isTcp && this.$refs.tcpParam){
if (this.isTcp && this.$refs.tcpParam) {
this.$refs.tcpParam.saveData();
}
let mockConfigId = this.mockConfigId;