fix(接口测试): fix api scenario steps error

https://www.tapd.cn/55049933/s/1598530
This commit is contained in:
Jianguo-Genius 2024-10-25 17:04:22 +08:00 committed by 建国
parent 61e1c504be
commit 579ff5d35f
1 changed files with 6 additions and 3 deletions

View File

@ -1218,9 +1218,7 @@ public class ApiScenarioDataTransferService {
response.addExportApiCase(dto); response.addExportApiCase(dto);
} }
} }
} else { } else {
// 普通导出,所有的引用都改为复制并且ApiApiCase改为CUSTOM_REQUEST // 普通导出,所有的引用都改为复制并且ApiApiCase改为CUSTOM_REQUEST
Map<String, String> stepApiDefinitionMap = new HashMap<>(); Map<String, String> stepApiDefinitionMap = new HashMap<>();
Map<String, String> stepApiCaseMap = new HashMap<>(); Map<String, String> stepApiCaseMap = new HashMap<>();
@ -1234,8 +1232,13 @@ public class ApiScenarioDataTransferService {
stepApiCaseMap.put(step.getId(), step.getResourceId()); stepApiCaseMap.put(step.getId(), step.getResourceId());
} }
} }
step.setRefType(ApiScenarioStepRefType.COPY.name());
if (StringUtils.equalsIgnoreCase(step.getStepType(), ApiScenarioStepType.API.name())) {
step.setStepType(ApiScenarioStepType.CUSTOM_REQUEST.name()); step.setStepType(ApiScenarioStepType.CUSTOM_REQUEST.name());
} else if (StringUtils.equalsIgnoreCase(step.getStepType(), ApiScenarioStepType.API_CASE.name())) {
step.setStepType(ApiScenarioStepType.CUSTOM_REQUEST.name());
}
step.setRefType(ApiScenarioStepRefType.COPY.name());
} }
}); });
Map<String, String> appendBlobMap = new HashMap<>(); Map<String, String> appendBlobMap = new HashMap<>();