fix(接口测试): 场景请求步骤另存为新接口修复
This commit is contained in:
parent
b6d56982c4
commit
12a9508283
|
@ -148,7 +148,6 @@
|
|||
|
||||
/**
|
||||
* 保存请求
|
||||
* @param isSaveCase 是否需要保存用例
|
||||
*/
|
||||
async function realSaveAsApi() {
|
||||
try {
|
||||
|
|
|
@ -903,9 +903,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
function handleStepMoreActionSelect(item: ActionsItem, node: MsTreeNodeData) {
|
||||
switch (item.eventTag) {
|
||||
case 'copy':
|
||||
/**
|
||||
* 复制步骤
|
||||
* @param node 复制的节点
|
||||
*/
|
||||
function copyStep(node: MsTreeNodeData) {
|
||||
const id = getGenerateId();
|
||||
const stepDetail = stepDetails.value[node.id];
|
||||
const stepFileParam = scenario.value.stepFileParam[node.id];
|
||||
|
@ -972,6 +974,12 @@
|
|||
'uniqueId'
|
||||
);
|
||||
scenario.value.unSaved = true;
|
||||
}
|
||||
|
||||
async function handleStepMoreActionSelect(item: ActionsItem, node: MsTreeNodeData) {
|
||||
switch (item.eventTag) {
|
||||
case 'copy':
|
||||
copyStep(node);
|
||||
break;
|
||||
case 'config':
|
||||
activeStep.value = node as ScenarioStepItem;
|
||||
|
@ -1005,6 +1013,10 @@
|
|||
break;
|
||||
case 'saveAsApi':
|
||||
activeStep.value = node as ScenarioStepItem;
|
||||
if (!stepDetails.value[activeStep.value.id]) {
|
||||
// 详情映射中没有对应数据,初始化步骤详情(复制的步骤没有加载详情前就被复制,打开复制后的步骤就初始化被复制步骤的详情)
|
||||
await getStepDetail(activeStep.value);
|
||||
}
|
||||
const detail = stepDetails.value[activeStep.value.id] as RequestParam;
|
||||
const fileParams = scenario.value.stepFileParam[activeStep.value.id];
|
||||
tempApiDetail.value = {
|
||||
|
|
Loading…
Reference in New Issue