refactor(接口测试): 接口测试创建新版时支持附带 case 和 mock
--story=1006600 --user=刘瑞斌 【接口测试】接口定义创建新版本时支持复制CASE和MOCK https://www.tapd.cn/55049933/s/1127054
This commit is contained in:
parent
a9cdf4a2bc
commit
3b7d41f001
|
@ -73,6 +73,7 @@
|
|||
<div>
|
||||
<el-checkbox v-model="basisData.newVersionRemark">{{ $t('commons.remark') }}</el-checkbox>
|
||||
<el-checkbox v-model="basisData.newVersionDeps">{{ $t('commons.relationship.name') }}</el-checkbox>
|
||||
<el-checkbox v-model="basisData.newVersionCase">CASE</el-checkbox>
|
||||
</div>
|
||||
|
||||
<template v-slot:footer>
|
||||
|
@ -352,7 +353,9 @@ export default {
|
|||
this.basisData.versionName = row.name;
|
||||
this.$set(this.basisData, 'newVersionRemark', !!this.basisData.remark);
|
||||
this.$set(this.basisData, 'newVersionDeps', this.$refs.apiOtherInfo.relationshipCount > 0);
|
||||
if (this.$refs.apiOtherInfo.relationshipCount > 0 || this.basisData.remark) {
|
||||
this.$set(this.basisData, 'newVersionCase', this.basisData.caseTotal > 0);
|
||||
|
||||
if (this.$refs.apiOtherInfo.relationshipCount > 0 || this.basisData.remark || this.basisData.newVersionCase) {
|
||||
this.createNewVersionVisible = true;
|
||||
} else {
|
||||
this.saveApi();
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
<div>
|
||||
<el-checkbox v-model="basisData.newVersionRemark">{{ $t('commons.remark') }}</el-checkbox>
|
||||
<el-checkbox v-model="basisData.newVersionDeps">{{ $t('commons.relationship.name') }}</el-checkbox>
|
||||
<el-checkbox v-model="basisData.newVersionCase">CASE</el-checkbox>
|
||||
</div>
|
||||
|
||||
<template v-slot:footer>
|
||||
|
@ -357,7 +358,9 @@ export default {
|
|||
this.basisData.versionName = row.name;
|
||||
this.$set(this.basisData, 'newVersionRemark', !!this.basisData.remark);
|
||||
this.$set(this.basisData, 'newVersionDeps', this.$refs.apiOtherInfo.relationshipCount > 0);
|
||||
if (this.$refs.apiOtherInfo.relationshipCount > 0 || this.basisData.remark) {
|
||||
this.$set(this.basisData, 'newVersionCase', this.basisData.caseTotal > 0);
|
||||
|
||||
if (this.$refs.apiOtherInfo.relationshipCount > 0 || this.basisData.remark || this.basisData.newVersionCase) {
|
||||
this.createNewVersionVisible = true;
|
||||
} else {
|
||||
this.saveApi();
|
||||
|
|
|
@ -108,6 +108,8 @@
|
|||
<div>
|
||||
<el-checkbox v-model="basisData.newVersionRemark">{{ $t('commons.remark') }}</el-checkbox>
|
||||
<el-checkbox v-model="basisData.newVersionDeps">{{ $t('commons.relationship.name') }}</el-checkbox>
|
||||
<el-checkbox v-model="basisData.newVersionCase">CASE</el-checkbox>
|
||||
<el-checkbox v-model="basisData.newVersionMock">MOCK</el-checkbox>
|
||||
</div>
|
||||
|
||||
<template v-slot:footer>
|
||||
|
@ -482,11 +484,18 @@ export default {
|
|||
this.basisData.versionName = row.name;
|
||||
this.$set(this.basisData, 'newVersionRemark', !!this.basisData.remark);
|
||||
this.$set(this.basisData, 'newVersionDeps', this.$refs.apiOtherInfo.relationshipCount > 0);
|
||||
if (this.$refs.apiOtherInfo.relationshipCount > 0 || this.basisData.remark) {
|
||||
this.createNewVersionVisible = true;
|
||||
} else {
|
||||
this.saveApi();
|
||||
}
|
||||
this.$set(this.basisData, 'newVersionCase', this.basisData.caseTotal > 0);
|
||||
|
||||
this.$post('/mockConfig/genMockConfig', {projectId: this.projectId, apiId: this.basisData.id}, response => {
|
||||
this.$set(this.basisData, 'newVersionMock', response.data.mockExpectConfigList.length > 0);
|
||||
|
||||
if (this.$refs.apiOtherInfo.relationshipCount > 0 || this.basisData.remark ||
|
||||
this.basisData.newVersionCase || this.basisData.newVersionMock) {
|
||||
this.createNewVersionVisible = true;
|
||||
} else {
|
||||
this.saveApi();
|
||||
}
|
||||
});
|
||||
},
|
||||
del(row) {
|
||||
this.$alert(this.$t('api_test.definition.request.delete_confirm') + ' ' + row.name + " ?", '', {
|
||||
|
|
Loading…
Reference in New Issue