mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 20:19:16 +08:00
refactor(接口测试): 修复接口测试报告中如果最后出现未执行的步骤在组装报告时会报错的问题
修复接口测试报告中如果最后出现未执行的步骤在组装报告时会报错的问题
This commit is contained in:
parent
60acf8f718
commit
10131cc9a4
@ -401,8 +401,13 @@ public class ApiScenarioReportStructureService {
|
||||
for (StepTreeDTO unListDTO : mergeList) {
|
||||
int index = unListDTO.getIndex();
|
||||
if (index > 0) {
|
||||
if (list.size() < (index - 1)) {
|
||||
list.add(unListDTO);
|
||||
} else {
|
||||
list.add(index - 1, unListDTO);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
for (int index = 0; index < list.size(); index++) {
|
||||
list.get(index).setIndex((index + 1));
|
||||
|
Loading…
Reference in New Issue
Block a user