fix(测试跟踪): 用例导入所属模块未以斜杠开头,导入报错

--bug=1028748 --user=陈建星 【测试跟踪】github#26173,功能用例导入 excel 报错 https://www.tapd.cn/55049933/s/1403809
This commit is contained in:
jianxing 2023-08-15 14:36:56 +08:00 committed by jianxing
parent f580d8e2a4
commit d9ee647cfe
1 changed files with 4 additions and 2 deletions

View File

@ -448,9 +448,11 @@ public class TestCaseNodeService extends NodeTreeService<TestCaseNodeDTO> {
if (nodeNameList.size() <= 1) {
throw new ExcelException(Translator.get("test_case_create_module_fail") + ":" + nodePath);
} else {
itemIterator.next();
itemIterator.remove();
rootNodeName = itemIterator.next().trim();
while (StringUtils.isBlank(rootNodeName) && itemIterator.hasNext()) {
itemIterator.remove();
rootNodeName = itemIterator.next().trim();
}
//原来没有新建的树nodeTrees也不包含
for (TestCaseNodeDTO nodeTree : nodeTrees) {
if (StringUtils.equals(rootNodeName, nodeTree.getName())) {