fix(测试跟踪): 功能用例导入xmind文件用例步骤显示乱码
--bug=1026697 --user=王旭 【测试跟踪】github#24784,功能用例 XMind 导入,文件包含特殊字符,用例步骤显示乱码 https://www.tapd.cn/55049933/s/1386203
This commit is contained in:
parent
06a3a274af
commit
94498e8318
|
@ -1118,6 +1118,10 @@ public class TestCaseService {
|
|||
request.setUseCustomId(useCunstomId);
|
||||
XmindCaseParser xmindParser = new XmindCaseParser(request);
|
||||
errList = xmindParser.parse(multipartFile);
|
||||
List<TestCaseWithBLOBs> testCase = xmindParser.getTestCase();
|
||||
testCase.forEach(testCaseWithBLOBs -> {
|
||||
testCaseWithBLOBs.setSteps(testCaseWithBLOBs.getSteps().replace("&","&"));
|
||||
});
|
||||
if (CollectionUtils.isEmpty(xmindParser.getNodePaths())
|
||||
&& CollectionUtils.isEmpty(xmindParser.getTestCase())
|
||||
&& CollectionUtils.isEmpty(xmindParser.getUpdateTestCase())) {
|
||||
|
@ -1136,9 +1140,9 @@ public class TestCaseService {
|
|||
testCaseNodeService.createNodes(xmindParser.getNodePaths(), projectId);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(xmindParser.getTestCase())) {
|
||||
this.saveImportData(xmindParser.getTestCase(), request, null);
|
||||
names = xmindParser.getTestCase().stream().map(TestCase::getName).collect(Collectors.toList());
|
||||
ids = xmindParser.getTestCase().stream().map(TestCase::getId).collect(Collectors.toList());
|
||||
this.saveImportData(testCase, request, null);
|
||||
names = testCase.stream().map(TestCase::getName).collect(Collectors.toList());
|
||||
ids = testCase.stream().map(TestCase::getId).collect(Collectors.toList());
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(xmindParser.getUpdateTestCase())) {
|
||||
this.updateImportData(xmindParser.getUpdateTestCase(), request, null);
|
||||
|
@ -1154,8 +1158,8 @@ public class TestCaseService {
|
|||
if (CollectionUtils.isNotEmpty(xmindParser.getUpdateTestCase())) {
|
||||
continueCaseList.removeAll(xmindParser.getUpdateTestCase());
|
||||
this.updateImportData(xmindParser.getUpdateTestCase(), request, null);
|
||||
names = xmindParser.getTestCase().stream().map(TestCase::getName).collect(Collectors.toList());
|
||||
ids = xmindParser.getTestCase().stream().map(TestCase::getId).collect(Collectors.toList());
|
||||
names = testCase.stream().map(TestCase::getName).collect(Collectors.toList());
|
||||
ids = testCase.stream().map(TestCase::getId).collect(Collectors.toList());
|
||||
}
|
||||
List<String> nodePathList = xmindParser.getValidatedNodePath();
|
||||
if (CollectionUtils.isNotEmpty(nodePathList)) {
|
||||
|
|
Loading…
Reference in New Issue