feat(接口测试): 场景复制步骤&复制场景文件

This commit is contained in:
baiqi 2024-12-09 17:13:29 +08:00 committed by Craftsman
parent 8e2b1b91fa
commit b4046ad7d5
3 changed files with 4 additions and 4 deletions

View File

@ -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
}

View File

@ -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 {

View File

@ -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 {