fix(用例管理): 修复用例评审复制评审失败问题
--bug=1036219 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001036219
This commit is contained in:
parent
7a453643ad
commit
342cde7dbf
|
@ -238,7 +238,11 @@ public class CaseReviewService {
|
||||||
List<String> caseIds = caseReviewFunctionalCases.stream().map(CaseReviewFunctionalCase::getCaseId).distinct().toList();
|
List<String> caseIds = caseReviewFunctionalCases.stream().map(CaseReviewFunctionalCase::getCaseId).distinct().toList();
|
||||||
CaseReview caseReview = addCaseReview(request, userId, caseReviewId, caseIds);
|
CaseReview caseReview = addCaseReview(request, userId, caseReviewId, caseIds);
|
||||||
BaseAssociateCaseRequest baseAssociateCaseRequest = request.getBaseAssociateCaseRequest();
|
BaseAssociateCaseRequest baseAssociateCaseRequest = request.getBaseAssociateCaseRequest();
|
||||||
addAssociate(request, userId, caseReviewId, caseIds, baseAssociateCaseRequest.getReviewers());
|
if (baseAssociateCaseRequest != null) {
|
||||||
|
addAssociate(request, userId, caseReviewId, caseIds, baseAssociateCaseRequest.getReviewers());
|
||||||
|
} else {
|
||||||
|
addAssociate(request, userId, caseReviewId, caseIds, request.getReviewers());
|
||||||
|
}
|
||||||
return caseReview;
|
return caseReview;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,6 +108,17 @@ public class CaseReviewControllerTests extends BaseTest {
|
||||||
List<String> list = caseReviews.stream().map(CaseReview::getId).distinct().toList();
|
List<String> list = caseReviews.stream().map(CaseReview::getId).distinct().toList();
|
||||||
Assertions.assertEquals(2, list.size());
|
Assertions.assertEquals(2, list.size());
|
||||||
|
|
||||||
|
caseReviewCopyRequest = getCaseReviewAddRequest("创建评审1", CaseReviewPassRule.SINGLE.toString(), "CASE_REVIEW_TEST_GYQ_ID", false, true, null);
|
||||||
|
caseReviewCopyRequest.setCopyId(caseReviewId);
|
||||||
|
caseReviewCopyRequest.setBaseAssociateCaseRequest(null);
|
||||||
|
mvcResult1 = this.requestPostWithOkAndReturn(COPY_CASE_REVIEW, caseReviewCopyRequest);
|
||||||
|
caseReview1 = getResultData(mvcResult1, CaseReview.class);
|
||||||
|
checkLog(caseReview1.getId(), OperationLogType.COPY);
|
||||||
|
caseReviews = getCaseReviews("创建评审1");
|
||||||
|
Assertions.assertEquals(3, caseReviews.size());
|
||||||
|
list = caseReviews.stream().map(CaseReview::getId).distinct().toList();
|
||||||
|
Assertions.assertEquals(3, list.size());
|
||||||
|
|
||||||
caseReviewRequest = getCaseReviewAddRequest("创建评审X", CaseReviewPassRule.SINGLE.toString(), "CASE_REVIEW_TEST_GYQ_ID", false, true, null);
|
caseReviewRequest = getCaseReviewAddRequest("创建评审X", CaseReviewPassRule.SINGLE.toString(), "CASE_REVIEW_TEST_GYQ_ID", false, true, null);
|
||||||
BaseAssociateCaseRequest baseAssociateCaseRequest = caseReviewRequest.getBaseAssociateCaseRequest();
|
BaseAssociateCaseRequest baseAssociateCaseRequest = caseReviewRequest.getBaseAssociateCaseRequest();
|
||||||
baseAssociateCaseRequest.setSelectAll(true);
|
baseAssociateCaseRequest.setSelectAll(true);
|
||||||
|
|
Loading…
Reference in New Issue