fix(测试用例): 修复导入文件编辑模式为空,步骤和结果导入错误问题

--bug=1044561 --user=王旭 【测试用例】github #32338导入用例时编辑模式为空,步骤描述和预期结果导入失败 https://www.tapd.cn/55049933/s/1561823
This commit is contained in:
WangXu10 2024-08-13 14:54:29 +08:00 committed by 刘瑞斌
parent bc470c226f
commit 5fa1a017d0
1 changed files with 4 additions and 4 deletions

View File

@ -276,14 +276,14 @@ public class FunctionalCaseImportEventListener extends AnalysisEventListener<Map
*/
private void handleSteps(FunctionalCaseExcelData functionalCaseExcelData) {
if (StringUtils.isNotBlank(functionalCaseExcelData.getCaseEditType()) && StringUtils.equalsIgnoreCase(functionalCaseExcelData.getCaseEditType(), FunctionalCaseTypeConstants.CaseEditType.TEXT.name())) {
functionalCaseExcelData.setTextDescription(functionalCaseExcelData.getTextDescription());
functionalCaseExcelData.setExpectedResult(functionalCaseExcelData.getExpectedResult());
} else {
if (StringUtils.isNotBlank(functionalCaseExcelData.getCaseEditType()) && StringUtils.equalsIgnoreCase(functionalCaseExcelData.getCaseEditType(), FunctionalCaseTypeConstants.CaseEditType.STEP.name())) {
String steps = getSteps(functionalCaseExcelData);
functionalCaseExcelData.setSteps(steps);
functionalCaseExcelData.setTextDescription(StringUtils.EMPTY);
functionalCaseExcelData.setExpectedResult(StringUtils.EMPTY);
} else {
functionalCaseExcelData.setTextDescription(functionalCaseExcelData.getTextDescription());
functionalCaseExcelData.setExpectedResult(functionalCaseExcelData.getExpectedResult());
}
}