fix(测试用例): 用例步骤为空导出后无字段

--bug=1045424 --user=王旭 【测试用例】用例导出为xmind-用例步骤无内容-导出勾选步骤描述和预期结果-导出后无该字段 https://www.tapd.cn/55049933/s/1574850
This commit is contained in:
WangXu10 2024-09-05 15:02:28 +08:00 committed by Craftsman
parent 40b46536ea
commit e5435ecf90
1 changed files with 15 additions and 3 deletions

View File

@ -522,9 +522,7 @@ public class XmindExportUtil {
}
textDesTopic.add(resultTopic, ITopic.ATTACHED);
if (StringUtils.isNotEmpty(desc) || StringUtils.isNotEmpty(result)) {
itemTopic.add(textDesTopic, ITopic.ATTACHED);
}
itemTopic.add(textDesTopic, ITopic.ATTACHED);
} else {
//步骤描述
try {
@ -564,6 +562,20 @@ public class XmindExportUtil {
}
}
if (CollectionUtils.isEmpty(arr)) {
ITopic stepTopic = workbook.createTopic();
stepTopic.setTitleText(Translator.get("xmind_step").concat(""));
if (style != null) {
stepTopic.setStyleId(style.getId());
}
ITopic resultTopic = workbook.createTopic();
resultTopic.setTitleText(Translator.get("xmind_expectedResult").concat(""));
if (style != null) {
resultTopic.setStyleId(style.getId());
}
stepTopic.add(resultTopic, ITopic.ATTACHED);
stepDesTopic.add(stepTopic, ITopic.ATTACHED);
}
itemTopic.add(stepDesTopic, ITopic.ATTACHED);
} catch (Exception e) {
}