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