fix(功能用例): 修复用例脑图更新问题
This commit is contained in:
parent
3096cc9c95
commit
d5587f023e
|
@ -990,7 +990,7 @@ public class FunctionalCaseMinderService {
|
||||||
functionalCase.setCreateTime(null);
|
functionalCase.setCreateTime(null);
|
||||||
//更新用例
|
//更新用例
|
||||||
caseMapper.updateByPrimaryKeySelective(functionalCase);
|
caseMapper.updateByPrimaryKeySelective(functionalCase);
|
||||||
return functionalCase;
|
return caseMapper.selectByPrimaryKey(functionalCase.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
private FunctionalCaseBlob updateBlob(FunctionalCaseChangeRequest functionalCaseChangeRequest, String caseId, FunctionalCaseBlobMapper caseBlobMapper) {
|
private FunctionalCaseBlob updateBlob(FunctionalCaseChangeRequest functionalCaseChangeRequest, String caseId, FunctionalCaseBlobMapper caseBlobMapper) {
|
||||||
|
|
|
@ -177,6 +177,7 @@ public class FunctionalCaseMinderControllerTest extends BaseTest {
|
||||||
customFields.add(customFieldDTO);
|
customFields.add(customFieldDTO);
|
||||||
caseChangeRequest.setCustomFields(customFields);
|
caseChangeRequest.setCustomFields(customFields);
|
||||||
caseChangeRequests.add(caseChangeRequest);
|
caseChangeRequests.add(caseChangeRequest);
|
||||||
|
|
||||||
caseChangeRequest = new FunctionalCaseChangeRequest();
|
caseChangeRequest = new FunctionalCaseChangeRequest();
|
||||||
caseChangeRequest.setId("TEST_FUNCTIONAL_MINDER_CASE_ID_1");
|
caseChangeRequest.setId("TEST_FUNCTIONAL_MINDER_CASE_ID_1");
|
||||||
caseChangeRequest.setName("TEST_MINDER_MODULE_ID_GYQ_更新");
|
caseChangeRequest.setName("TEST_MINDER_MODULE_ID_GYQ_更新");
|
||||||
|
@ -196,6 +197,7 @@ public class FunctionalCaseMinderControllerTest extends BaseTest {
|
||||||
caseChangeRequest.setCustomFields(customFields);
|
caseChangeRequest.setCustomFields(customFields);
|
||||||
caseChangeRequests.add(caseChangeRequest);
|
caseChangeRequests.add(caseChangeRequest);
|
||||||
request.setUpdateCaseList(caseChangeRequests);
|
request.setUpdateCaseList(caseChangeRequests);
|
||||||
|
|
||||||
List<FunctionalCaseModuleEditRequest> functionalCaseModuleEditRequests = new ArrayList<>();
|
List<FunctionalCaseModuleEditRequest> functionalCaseModuleEditRequests = new ArrayList<>();
|
||||||
FunctionalCaseModuleEditRequest functionalCaseModuleEditRequest = new FunctionalCaseModuleEditRequest();
|
FunctionalCaseModuleEditRequest functionalCaseModuleEditRequest = new FunctionalCaseModuleEditRequest();
|
||||||
functionalCaseModuleEditRequest.setId("uuuId");
|
functionalCaseModuleEditRequest.setId("uuuId");
|
||||||
|
@ -214,6 +216,7 @@ public class FunctionalCaseMinderControllerTest extends BaseTest {
|
||||||
functionalCaseModuleEditRequest.setParentId("TEST_MINDER_MODULE_ID_GYQ");
|
functionalCaseModuleEditRequest.setParentId("TEST_MINDER_MODULE_ID_GYQ");
|
||||||
functionalCaseModuleEditRequests.add(functionalCaseModuleEditRequest);
|
functionalCaseModuleEditRequests.add(functionalCaseModuleEditRequest);
|
||||||
request.setUpdateModuleList(functionalCaseModuleEditRequests);
|
request.setUpdateModuleList(functionalCaseModuleEditRequests);
|
||||||
|
|
||||||
List<MindAdditionalNodeRequest> additionalNodeList = new ArrayList<>();
|
List<MindAdditionalNodeRequest> additionalNodeList = new ArrayList<>();
|
||||||
MindAdditionalNodeRequest mindAdditionalNodeRequest = new MindAdditionalNodeRequest();
|
MindAdditionalNodeRequest mindAdditionalNodeRequest = new MindAdditionalNodeRequest();
|
||||||
mindAdditionalNodeRequest.setId("weyyg");
|
mindAdditionalNodeRequest.setId("weyyg");
|
||||||
|
@ -228,6 +231,7 @@ public class FunctionalCaseMinderControllerTest extends BaseTest {
|
||||||
mindAdditionalNodeRequest.setParentId("TEST_MINDER_MODULE_ID_GYQ");
|
mindAdditionalNodeRequest.setParentId("TEST_MINDER_MODULE_ID_GYQ");
|
||||||
additionalNodeList.add(mindAdditionalNodeRequest);
|
additionalNodeList.add(mindAdditionalNodeRequest);
|
||||||
request.setAdditionalNodeList(additionalNodeList);
|
request.setAdditionalNodeList(additionalNodeList);
|
||||||
|
|
||||||
List<MinderOptionDTO> deleteResourceList = new ArrayList<>();
|
List<MinderOptionDTO> deleteResourceList = new ArrayList<>();
|
||||||
MinderOptionDTO minderOptionDTO = new MinderOptionDTO();
|
MinderOptionDTO minderOptionDTO = new MinderOptionDTO();
|
||||||
minderOptionDTO.setId("TEST_FUNCTIONAL_MINDER_CASE_ID_9");
|
minderOptionDTO.setId("TEST_FUNCTIONAL_MINDER_CASE_ID_9");
|
||||||
|
@ -243,6 +247,12 @@ public class FunctionalCaseMinderControllerTest extends BaseTest {
|
||||||
deleteResourceList.add(minderOptionDTO);
|
deleteResourceList.add(minderOptionDTO);
|
||||||
request.setDeleteResourceList(deleteResourceList);
|
request.setDeleteResourceList(deleteResourceList);
|
||||||
this.requestPostWithOkAndReturn(FUNCTIONAL_CASE_EDIT_URL, request);
|
this.requestPostWithOkAndReturn(FUNCTIONAL_CASE_EDIT_URL, request);
|
||||||
|
|
||||||
|
FunctionalCase functionalCase = functionalCaseMapper.selectByPrimaryKey("TEST_FUNCTIONAL_MINDER_CASE_ID_1");
|
||||||
|
System.out.println(functionalCase);
|
||||||
|
|
||||||
|
Assertions.assertTrue(StringUtils.equalsIgnoreCase(functionalCase.getName(),"TEST_MINDER_MODULE_ID_GYQ_更新"));
|
||||||
|
|
||||||
MindAdditionalNode mindAdditionalNode = mindAdditionalNodeMapper.selectByPrimaryKey("additional2");
|
MindAdditionalNode mindAdditionalNode = mindAdditionalNodeMapper.selectByPrimaryKey("additional2");
|
||||||
Assertions.assertTrue(StringUtils.equalsIgnoreCase(mindAdditionalNode.getParentId(),"TEST_MINDER_MODULE_ID_GYQ"));
|
Assertions.assertTrue(StringUtils.equalsIgnoreCase(mindAdditionalNode.getParentId(),"TEST_MINDER_MODULE_ID_GYQ"));
|
||||||
FunctionalCaseExample functionalCaseExample = new FunctionalCaseExample();
|
FunctionalCaseExample functionalCaseExample = new FunctionalCaseExample();
|
||||||
|
@ -250,6 +260,8 @@ public class FunctionalCaseMinderControllerTest extends BaseTest {
|
||||||
List<FunctionalCase> functionalCases = functionalCaseMapper.selectByExample(functionalCaseExample);
|
List<FunctionalCase> functionalCases = functionalCaseMapper.selectByExample(functionalCaseExample);
|
||||||
Assertions.assertTrue(CollectionUtils.isNotEmpty(functionalCases));
|
Assertions.assertTrue(CollectionUtils.isNotEmpty(functionalCases));
|
||||||
Assertions.assertTrue(functionalCases.get(0).getPos() > 0L);
|
Assertions.assertTrue(functionalCases.get(0).getPos() > 0L);
|
||||||
|
|
||||||
|
Assertions.assertTrue(CollectionUtils.isNotEmpty(functionalCases));
|
||||||
FunctionalCaseCustomFieldExample customFieldExample = new FunctionalCaseCustomFieldExample();
|
FunctionalCaseCustomFieldExample customFieldExample = new FunctionalCaseCustomFieldExample();
|
||||||
customFieldExample.createCriteria().andCaseIdEqualTo(functionalCases.get(0).getId()).andFieldIdEqualTo("custom_field_minder_gyq_id_3");
|
customFieldExample.createCriteria().andCaseIdEqualTo(functionalCases.get(0).getId()).andFieldIdEqualTo("custom_field_minder_gyq_id_3");
|
||||||
List<FunctionalCaseCustomField> functionalCaseCustomFields = functionalCaseCustomFieldMapper.selectByExample(customFieldExample);
|
List<FunctionalCaseCustomField> functionalCaseCustomFields = functionalCaseCustomFieldMapper.selectByExample(customFieldExample);
|
||||||
|
|
Loading…
Reference in New Issue