fix(接口测试): 修复复制case时没有将请求参数信息复制过来的缺陷
--bug=1037700 --user=吕梦园 【接口测试】接口定义-CASE列表-复制请求体中包含file的case复制文件失败 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037700 --bug=1037689 --user=吕梦园【接口测试】接口定义-CASE列表-复制CASE-新用例没有复制原用例初请求头和请求体的其他配置信息 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037689
This commit is contained in:
parent
cc3dd43dde
commit
1f4b8b44e6
|
@ -195,7 +195,7 @@
|
||||||
v-permission="['PROJECT_API_DEFINITION_CASE:READ+UPDATE']"
|
v-permission="['PROJECT_API_DEFINITION_CASE:READ+UPDATE']"
|
||||||
type="text"
|
type="text"
|
||||||
class="!mr-0"
|
class="!mr-0"
|
||||||
@click="editCase(record)"
|
@click="editOrCopyCase(record, false)"
|
||||||
>
|
>
|
||||||
{{ t('common.edit') }}
|
{{ t('common.edit') }}
|
||||||
</MsButton>
|
</MsButton>
|
||||||
|
@ -221,7 +221,7 @@
|
||||||
v-permission="['PROJECT_API_DEFINITION_CASE:READ+ADD']"
|
v-permission="['PROJECT_API_DEFINITION_CASE:READ+ADD']"
|
||||||
type="text"
|
type="text"
|
||||||
class="!mr-0"
|
class="!mr-0"
|
||||||
@click="copyCase(record)"
|
@click="editOrCopyCase(record, true)"
|
||||||
>
|
>
|
||||||
{{ t('common.copy') }}
|
{{ t('common.copy') }}
|
||||||
</MsButton>
|
</MsButton>
|
||||||
|
@ -925,9 +925,6 @@
|
||||||
function createCase() {
|
function createCase() {
|
||||||
createAndEditCaseDrawerRef.value?.open(props.apiDetail?.id as string);
|
createAndEditCaseDrawerRef.value?.open(props.apiDetail?.id as string);
|
||||||
}
|
}
|
||||||
function copyCase(record: ApiCaseDetail) {
|
|
||||||
createAndEditCaseDrawerRef.value?.open(record.apiDefinitionId, record, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
function openCaseTab(record: ApiCaseDetail) {
|
function openCaseTab(record: ApiCaseDetail) {
|
||||||
emit('openCaseTab', record);
|
emit('openCaseTab', record);
|
||||||
|
@ -980,9 +977,9 @@
|
||||||
loadCaseList();
|
loadCaseList();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function editCase(record: ApiCaseDetail) {
|
async function editOrCopyCase(record: ApiCaseDetail, isCopy: boolean) {
|
||||||
await getCaseDetailInfo(record.id);
|
await getCaseDetailInfo(record.id);
|
||||||
createAndEditCaseDrawerRef.value?.open(record.apiDefinitionId, caseDetail.value as RequestParam);
|
createAndEditCaseDrawerRef.value?.open(record.apiDefinitionId, caseDetail.value as RequestParam, isCopy);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 在api下的用例里打开用例详情抽屉,点击编辑,编辑后在此刷新数据
|
// 在api下的用例里打开用例详情抽屉,点击编辑,编辑后在此刷新数据
|
||||||
|
|
|
@ -205,6 +205,7 @@
|
||||||
};
|
};
|
||||||
// 复制
|
// 复制
|
||||||
if (isCopy) {
|
if (isCopy) {
|
||||||
|
detailForm.value = cloneDeep(record as RequestParam);
|
||||||
detailForm.value.name = `copy_${record?.name}`;
|
detailForm.value.name = `copy_${record?.name}`;
|
||||||
}
|
}
|
||||||
environmentId.value = currentEnvConfig?.value?.id;
|
environmentId.value = currentEnvConfig?.value?.id;
|
||||||
|
|
Loading…
Reference in New Issue