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