fix(接口测试): xmind导入用例校验重复

--bug=1044487 --user=陈建星 【测试跟踪】GitHub #32296 xmind导入用例,如果用例里包含同名的用例,而用例ID不同,可以保存成功 https://www.tapd.cn/55049933/s/1564786
This commit is contained in:
AgAngle 2024-08-19 15:10:30 +08:00 committed by Craftsman
parent de4b303a45
commit 472ac681c8
1 changed files with 4 additions and 1 deletions

View File

@ -1,7 +1,6 @@
package io.metersphere.xmind;
import io.metersphere.base.domain.TestCaseWithBLOBs;
import io.metersphere.commons.constants.TestCaseConstants;
import io.metersphere.commons.utils.BeanUtils;
import io.metersphere.commons.utils.CommonBeanFactory;
import io.metersphere.commons.utils.JSON;
@ -242,6 +241,10 @@ public class XmindCaseParser {
return false;
}
}
if (testCaseService.exist(data)) {
process.add(Translator.get("test_case_already_exists"), nodePath + "/" + data.getName());
return false;
}
}
if (validatePass) {