fix(接口测试): 批量复制场景,无法展开子步骤
--bug=1047506 --user=陈建星 【接口测试】批量复制场景后,场景中的场景类型步骤无法展开 https://www.tapd.cn/55049933/s/1594910
This commit is contained in:
parent
3039a75155
commit
d8ceb22bb6
|
@ -2025,12 +2025,18 @@ public class ApiScenarioService extends MoveNodeService {
|
|||
}
|
||||
|
||||
List<ApiScenarioStep> stepList = apiScenarioStepMap.get(apiScenario.getId());
|
||||
Map<String, String> originStepIdMap = new HashMap<>();
|
||||
if (CollectionUtils.isNotEmpty(stepList)) {
|
||||
stepList.forEach(step -> {
|
||||
String originStepId = step.getId();
|
||||
ApiScenarioStep copyStep = new ApiScenarioStep();
|
||||
BeanUtils.copyBean(copyStep, step);
|
||||
copyStep.setId(IDGenerator.nextStr());
|
||||
copyStep.setScenarioId(copyScenario.getId());
|
||||
originStepIdMap.put(originStepId, copyStep.getId());
|
||||
if (StringUtils.isNotBlank(step.getParentId()) && originStepIdMap.containsKey(step.getParentId())) {
|
||||
copyStep.setParentId(originStepIdMap.get(step.getParentId()));
|
||||
}
|
||||
insertApiScenarioStepList.add(copyStep);
|
||||
|
||||
//这块的批量复制不处理csv文件和场景的配置信息
|
||||
|
|
Loading…
Reference in New Issue