fix(用户跟踪):xmind格式标签优化
--bug=1006452 --user=王孝刚 【github#5995】V1.12.1中xmind格式导入,标签tag字段进行多标签设置,会被合并为一个 https://www.tapd.cn/55049933/s/1046070
This commit is contained in:
parent
f180ec9724
commit
1546905d4b
|
@ -160,10 +160,10 @@ public class XmindCaseParser {
|
|||
|
||||
|
||||
//用例名称判断
|
||||
if(StringUtils.isEmpty(data.getName())){
|
||||
if (StringUtils.isEmpty(data.getName())) {
|
||||
validatePass = false;
|
||||
process.add("name" + Translator.get("cannot_be_null"), nodePath + "");
|
||||
}else {
|
||||
} else {
|
||||
if (data.getName().length() > 200) {
|
||||
validatePass = false;
|
||||
process.add(Translator.get("test_case") + Translator.get("test_track.length_less_than") + "200", nodePath + data.getName());
|
||||
|
@ -171,7 +171,6 @@ public class XmindCaseParser {
|
|||
}
|
||||
|
||||
|
||||
|
||||
if (!StringUtils.isEmpty(nodePath)) {
|
||||
String[] nodes = nodePath.split("/");
|
||||
if (nodes.length > TestCaseConstants.MAX_NODE_DEPTH + 1) {
|
||||
|
@ -418,7 +417,13 @@ public class XmindCaseParser {
|
|||
testCase.setCustomNum(customId.toString());
|
||||
}
|
||||
|
||||
testCase.setTags(JSON.toJSONString(tags));
|
||||
List<String> tagsNew = new ArrayList();
|
||||
if (CollectionUtils.isNotEmpty(tags)) {
|
||||
String tagsData = tags.get(0);
|
||||
String[] array = tagsData.split("[, ,]");
|
||||
Arrays.asList(array).stream().forEach(x -> tagsNew.add(x));
|
||||
}
|
||||
testCase.setTags(JSON.toJSONString(tagsNew));
|
||||
testCase.setSteps(this.getSteps(steps));
|
||||
// 校验合规性
|
||||
if (validate(testCase)) {
|
||||
|
|
Loading…
Reference in New Issue