fix(测试跟踪): 步骤类型为文本描述的用例导入后,无法查看变更记录

--bug=1041825 --user=陈建星 【测试跟踪】github#31266,批量导入的功能用例,再次编辑更新时,没有变更记录 https://www.tapd.cn/55049933/s/1550243
This commit is contained in:
AgAngle 2024-07-18 14:10:25 +08:00 committed by 刘瑞斌
parent 6ffac87d3f
commit 58067129d9
2 changed files with 2 additions and 1 deletions

View File

@ -135,7 +135,7 @@ public class OperatingLogService {
columns.stream().forEach(column -> { columns.stream().forEach(column -> {
if (StringUtils.isNotEmpty(column.getColumnTitle())) { if (StringUtils.isNotEmpty(column.getColumnTitle())) {
if (StringUtils.equalsIgnoreCase(TestCaseReference.testCaseColumns.get(column.getColumnName()), column.getColumnTitle())) { if (StringUtils.equalsIgnoreCase(TestCaseReference.testCaseColumns.get(column.getColumnName()), column.getColumnTitle())) {
column.setOriginalValue(Translator.get(column.getOriginalValue().toString()).replace("Not Support Key:", "")); column.setOriginalValue(Translator.get(Optional.ofNullable(column.getOriginalValue()).orElse(StringUtils.EMPTY).toString()).replace("Not Support Key:", ""));
column.setNewValue(Translator.get(column.getNewValue().toString()).replace("Not Support Key:", "")); column.setNewValue(Translator.get(column.getNewValue().toString()).replace("Not Support Key:", ""));
} }
String columnsTitle = Translator.get(column.getColumnTitle()); String columnsTitle = Translator.get(column.getColumnTitle());

View File

@ -647,6 +647,7 @@ public class TestCaseNoModelDataListener extends AnalysisEventListener<Map<Integ
&& StringUtils.equals(data.getStepModel(), TestCaseConstants.StepModel.TEXT.name())) { && StringUtils.equals(data.getStepModel(), TestCaseConstants.StepModel.TEXT.name())) {
testCase.setStepDescription(data.getStepDesc()); testCase.setStepDescription(data.getStepDesc());
testCase.setExpectedResult(data.getStepResult()); testCase.setExpectedResult(data.getStepResult());
testCase.setSteps("[]");
} else { } else {
String steps = getSteps(data); String steps = getSteps(data);
testCase.setSteps(steps); testCase.setSteps(steps);