diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/record/RecordProperties.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/record/RecordProperties.java index 8732533cf2..5e7a08322e 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/record/RecordProperties.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/record/RecordProperties.java @@ -64,6 +64,7 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_ORIGINATING_USER_ID; import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_ORIGINATING_CREATION_DATE; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import org.alfresco.rest.rm.community.model.common.Owner; @@ -86,6 +87,7 @@ import lombok.NoArgsConstructor; @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @AllArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) public class RecordProperties extends TestModel { /*************************/ diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/TestData.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/TestData.java index d5a24f5789..a1ebcb2d11 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/TestData.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/TestData.java @@ -187,7 +187,9 @@ public interface TestData { RECORD_CATEGORY_TYPE }, { RECORD_FOLDER_TYPE }, { TRANSFER_CONTAINER_TYPE }, - { UNFILED_CONTAINER_TYPE } + { TRANSFER_TYPE }, + { UNFILED_CONTAINER_TYPE }, + }; } } diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordfolders/RecordFolderTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordfolders/RecordFolderTests.java index 6381fe88f9..8a7209340a 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordfolders/RecordFolderTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordfolders/RecordFolderTests.java @@ -34,6 +34,7 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.IS_CLOSED; import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.CONTENT_TYPE; import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.FILE_PLAN_TYPE; +import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.FOLDER_TYPE; import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.NON_ELECTRONIC_RECORD_TYPE; import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.RECORD_CATEGORY_TYPE; import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.RECORD_FOLDER_TYPE; @@ -105,7 +106,8 @@ public class RecordFolderTests extends BaseRMRestTest { UNFILED_CONTAINER_TYPE }, { UNFILED_RECORD_FOLDER_TYPE }, { TRANSFER_TYPE }, - { RECORD_CATEGORY_TYPE } + { RECORD_CATEGORY_TYPE }, + { FOLDER_TYPE } }; } @@ -370,9 +372,6 @@ public class RecordFolderTests extends BaseRMRestTest // Make a request to close the record folder RecordFolder updatedRecordFolder = recordFolderAPI.updateRecordFolder(recordFolderModel, recordFolder.getId()); - //FIXME - remove this workaround after RM-4921 is fixed. - updatedRecordFolder = recordFolderAPI.getRecordFolder(updatedRecordFolder.getId()); - // Verify that the record folder is closed now assertTrue(updatedRecordFolder.getProperties().getIsClosed()); @@ -386,9 +385,6 @@ public class RecordFolderTests extends BaseRMRestTest // Make a request to reopen the record folder updatedRecordFolder = recordFolderAPI.updateRecordFolder(recordFolderModel, recordFolder.getId()); - //FIXME - remove this workaround after RM-4921 is fixed. - updatedRecordFolder = recordFolderAPI.getRecordFolder(updatedRecordFolder.getId()); - // Verify that the record folder is open now assertFalse(updatedRecordFolder.getProperties().getIsClosed()); } diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/unfiledcontainers/UnfiledContainerTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/unfiledcontainers/UnfiledContainerTests.java index 3deeab829c..c384ecb206 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/unfiledcontainers/UnfiledContainerTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/unfiledcontainers/UnfiledContainerTests.java @@ -431,7 +431,8 @@ public class UnfiledContainerTests extends BaseRMRestTest try { getRestAPIFactory().getUnfiledContainersAPI().createUnfiledContainerChild(unfiledFolderModel, UNFILED_RECORDS_CONTAINER_ALIAS); - } catch (Exception error) + } + catch (Exception error) { } // Verify the status code diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/unfiledrecordfolders/UnfiledRecordsFolderTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/unfiledrecordfolders/UnfiledRecordsFolderTests.java index 7e6c18b500..e640e9d86a 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/unfiledrecordfolders/UnfiledRecordsFolderTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/unfiledrecordfolders/UnfiledRecordsFolderTests.java @@ -487,8 +487,10 @@ public class UnfiledRecordsFolderTests extends BaseRMRestTest assertTrue(record.getName().equals(createdComponent.getName()), "The record name "+ record.getName()+" is not equal with the record name returned when creating the record " + createdComponent .getName()); - - assertTrue(record.getName().equals(record.getProperties().getIdentifier())); + String identifier = " \\(" + record.getProperties().getIdentifier() + "\\)"; + String regex= "(" + NONELECTRONIC_RECORD_NAME + "|" + ELECTRONIC_RECORD_NAME + ")" + "[0-9]+" + identifier; + assertTrue(record.getName().matches(regex), + "The record name :" + record.getName() +"doesn't match the expression " + regex); assertTrue(createdComponent.getName().contains(createdComponent.getProperties().getIdentifier())); assertEquals(createdComponent.getNodeType(), record.getNodeType());