fix(接口测试): 修复引用场景显示问题
--bug=1010071 --user=赵勇 【接口测试】场景,引用其他场景后,显示原始用例已删除 https://www.tapd.cn/55049933/s/1102416
This commit is contained in:
parent
a7d0475891
commit
fe7d3b1d48
|
@ -192,7 +192,7 @@ public class ApiAutomationController {
|
|||
|
||||
@PostMapping("/getApiScenarios")
|
||||
public List<ApiScenarioDTO> getApiScenarios(@RequestBody List<String> ids) {
|
||||
return apiAutomationService.getApiScenarios(ids);
|
||||
return apiAutomationService.getNewApiScenarios(ids);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/run/debug")
|
||||
|
|
|
@ -728,6 +728,17 @@ public class ApiAutomationService {
|
|||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
public List<ApiScenarioDTO> getNewApiScenarios(List<String> ids) {
|
||||
List<ApiScenarioDTO> list = new LinkedList<>();
|
||||
if (CollectionUtils.isNotEmpty(ids)) {
|
||||
ids.forEach(item -> {
|
||||
ApiScenarioDTO dto = this.getNewApiScenario(item);
|
||||
list.add(dto);
|
||||
});
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public byte[] loadFileAsBytes(FileOperationRequest fileOperationRequest) {
|
||||
if (fileOperationRequest.getId().contains("/") || fileOperationRequest.getName().contains("/"))
|
||||
MSException.throwException(Translator.get("invalid_parameter"));
|
||||
|
|
Loading…
Reference in New Issue