fix(接口测试): 修复场景批量复制,不显示步骤的缺陷
--bug=1039944 --user=王孝刚 【接口测试】场景-批量-复制到-没把场景内步骤复制过去 https://www.tapd.cn/55049933/s/1506814
This commit is contained in:
parent
65fb597820
commit
23a1fc0fb1
|
@ -2176,7 +2176,12 @@ public class ApiScenarioService extends MoveNodeService {
|
||||||
|
|
||||||
Map<String, List<ApiScenarioStepDTO>> currentScenarioParentStepMap = scenarioStepMap.get(scenarioId)
|
Map<String, List<ApiScenarioStepDTO>> currentScenarioParentStepMap = scenarioStepMap.get(scenarioId)
|
||||||
.stream()
|
.stream()
|
||||||
.collect(Collectors.groupingBy(step -> Optional.ofNullable(step.getParentId()).orElse(StringUtils.EMPTY)));
|
.collect(Collectors.groupingBy(step -> {
|
||||||
|
if (StringUtils.equals(step.getParentId(), "NONE")) {
|
||||||
|
step.setParentId(StringUtils.EMPTY);
|
||||||
|
}
|
||||||
|
return Optional.ofNullable(step.getParentId()).orElse(StringUtils.EMPTY);
|
||||||
|
}));
|
||||||
|
|
||||||
List<ApiScenarioStepDTO> steps = buildStepTree(currentScenarioParentStepMap.get(StringUtils.EMPTY), currentScenarioParentStepMap, scenarioStepMap, new HashSet<>());
|
List<ApiScenarioStepDTO> steps = buildStepTree(currentScenarioParentStepMap.get(StringUtils.EMPTY), currentScenarioParentStepMap, scenarioStepMap, new HashSet<>());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue