refactor(测试跟踪): 加强导入校验,有效判断模版合规性

This commit is contained in:
fit2-zhao 2020-10-09 17:31:12 +08:00
parent a429bd8d1b
commit f8d2322386
4 changed files with 13 additions and 4 deletions

View File

@ -286,7 +286,13 @@ public class TestCaseService {
ExcelErrData excelErrData = new ExcelErrData(null, 1, Translator.get("upload_fail") + "" + processLog);
errList.add(excelErrData);
excelResponse.setErrList(errList);
} else {
}else if(xmindParser.getNodePaths().isEmpty() && xmindParser.getTestCase().isEmpty() ){
excelResponse.setSuccess(false);
ExcelErrData excelErrData = new ExcelErrData(null, 1, Translator.get("upload_fail") + "" + Translator.get("upload_content_is_null"));
errList.add(excelErrData);
excelResponse.setErrList(errList);
}
else {
if (!xmindParser.getNodePaths().isEmpty()) {
testCaseNodeService.createNodes(xmindParser.getNodePaths(), projectId);
}

View File

@ -160,4 +160,5 @@ test_review_task_notice=Test review task notice
test_track.length_less_than=The title is too long, the length must be less than
# check owner
check_owner_project=The current user does not have permission to operate this project
check_owner_test=The current user does not have permission to operate this test
check_owner_test=The current user does not have permission to operate this test
upload_content_is_null=Imported content is empty

View File

@ -160,4 +160,5 @@ test_review_task_notice=测试评审任务通知
test_track.length_less_than=标题过长,字数必须小于
# check owner
check_owner_project=当前用户没有操作此项目的权限
check_owner_test=当前用户没有操作此测试的权限
check_owner_test=当前用户没有操作此测试的权限
upload_content_is_null=导入内容为空

View File

@ -161,4 +161,5 @@ test_review_task_notice=測試評審任務通知
test_track.length_less_than=標題過長,字數必須小於
# check owner
check_owner_project=當前用戶沒有操作此項目的權限
check_owner_test=當前用戶沒有操作此測試的權限
check_owner_test=當前用戶沒有操作此測試的權限
upload_content_is_null=導入內容為空