feat(接口测试): 场景复制步骤&复制场景文件
This commit is contained in:
parent
8e2b1b91fa
commit
b4046ad7d5
|
@ -1224,9 +1224,9 @@
|
|||
stepType: props.step?.stepType,
|
||||
refType: props.step?.refType,
|
||||
isTempFile: false, // 复制未保存的步骤时 true
|
||||
fileIds: Object.values(parseRequestBodyFiles(res.request.body, [], [], [])).flat(),
|
||||
fileIds: parseRequestBodyFiles(res.request.body, [], [], []).uploadFileIds,
|
||||
});
|
||||
parseRequestBodyFiles(res.body, [], [], [], copyStepFileIdsMap.value);
|
||||
parseRequestBodyFiles(res.request.body, [], [], [], copyStepFileIdsMap.value);
|
||||
} else {
|
||||
parseRequestBodyResult = parseRequestBodyFiles(res.request.body, [], [], [], copyStepFileIdsMap.value); // 解析请求体中的文件,将详情中的文件 id 集合收集,更新时以判断文件是否删除以及是否新上传的文件
|
||||
}
|
||||
|
|
|
@ -949,7 +949,7 @@
|
|||
stepType: node.stepType,
|
||||
refType: node.refType,
|
||||
isTempFile: !!stepDetail, // 复制未保存的步骤时 true
|
||||
fileIds: Object.values(parseRequestBodyFiles((stepDetail as RequestParam).body, [], [], [])).flat(),
|
||||
fileIds: parseRequestBodyFiles((stepDetail as RequestParam).body, [], [], []).uploadFileIds,
|
||||
});
|
||||
parseRequestBodyFiles((stepDetail as RequestParam).body, [], [], [], newFileRes);
|
||||
} else {
|
||||
|
|
|
@ -74,7 +74,7 @@ export default function useStepOperation({
|
|||
stepType: step.stepType,
|
||||
refType: step.refType,
|
||||
isTempFile: false, // 复制未保存的步骤时 true
|
||||
fileIds: Object.values(parseRequestBodyFiles((res as RequestParam).body, [], [], [])).flat(),
|
||||
fileIds: parseRequestBodyFiles((res as RequestParam).body, [], [], []).uploadFileIds,
|
||||
});
|
||||
parseRequestBodyFiles(res.body, [], [], [], newFileRes);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue