mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
tests updates, remove FIXME notes
add a check for the issue RM-4372
This commit is contained in:
@@ -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_USER_ID;
|
||||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_ORIGINATING_CREATION_DATE;
|
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 com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
import org.alfresco.rest.rm.community.model.common.Owner;
|
import org.alfresco.rest.rm.community.model.common.Owner;
|
||||||
@@ -86,6 +87,7 @@ import lombok.NoArgsConstructor;
|
|||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class RecordProperties extends TestModel
|
public class RecordProperties extends TestModel
|
||||||
{
|
{
|
||||||
/*************************/
|
/*************************/
|
||||||
|
@@ -187,7 +187,9 @@ public interface TestData
|
|||||||
{ RECORD_CATEGORY_TYPE },
|
{ RECORD_CATEGORY_TYPE },
|
||||||
{ RECORD_FOLDER_TYPE },
|
{ RECORD_FOLDER_TYPE },
|
||||||
{ TRANSFER_CONTAINER_TYPE },
|
{ TRANSFER_CONTAINER_TYPE },
|
||||||
{ UNFILED_CONTAINER_TYPE }
|
{ TRANSFER_TYPE },
|
||||||
|
{ UNFILED_CONTAINER_TYPE },
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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.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.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.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.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_CATEGORY_TYPE;
|
||||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.RECORD_FOLDER_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_CONTAINER_TYPE },
|
||||||
{ UNFILED_RECORD_FOLDER_TYPE },
|
{ UNFILED_RECORD_FOLDER_TYPE },
|
||||||
{ TRANSFER_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
|
// Make a request to close the record folder
|
||||||
RecordFolder updatedRecordFolder = recordFolderAPI.updateRecordFolder(recordFolderModel, recordFolder.getId());
|
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
|
// Verify that the record folder is closed now
|
||||||
assertTrue(updatedRecordFolder.getProperties().getIsClosed());
|
assertTrue(updatedRecordFolder.getProperties().getIsClosed());
|
||||||
|
|
||||||
@@ -386,9 +385,6 @@ public class RecordFolderTests extends BaseRMRestTest
|
|||||||
// Make a request to reopen the record folder
|
// Make a request to reopen the record folder
|
||||||
updatedRecordFolder = recordFolderAPI.updateRecordFolder(recordFolderModel, recordFolder.getId());
|
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
|
// Verify that the record folder is open now
|
||||||
assertFalse(updatedRecordFolder.getProperties().getIsClosed());
|
assertFalse(updatedRecordFolder.getProperties().getIsClosed());
|
||||||
}
|
}
|
||||||
|
@@ -431,7 +431,8 @@ public class UnfiledContainerTests extends BaseRMRestTest
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
getRestAPIFactory().getUnfiledContainersAPI().createUnfiledContainerChild(unfiledFolderModel, UNFILED_RECORDS_CONTAINER_ALIAS);
|
getRestAPIFactory().getUnfiledContainersAPI().createUnfiledContainerChild(unfiledFolderModel, UNFILED_RECORDS_CONTAINER_ALIAS);
|
||||||
} catch (Exception error)
|
}
|
||||||
|
catch (Exception error)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
// Verify the status code
|
// Verify the status code
|
||||||
|
@@ -487,8 +487,10 @@ public class UnfiledRecordsFolderTests extends BaseRMRestTest
|
|||||||
assertTrue(record.getName().equals(createdComponent.getName()),
|
assertTrue(record.getName().equals(createdComponent.getName()),
|
||||||
"The record name "+ record.getName()+" is not equal with the record name returned when creating the record " + createdComponent
|
"The record name "+ record.getName()+" is not equal with the record name returned when creating the record " + createdComponent
|
||||||
.getName());
|
.getName());
|
||||||
|
String identifier = " \\(" + record.getProperties().getIdentifier() + "\\)";
|
||||||
assertTrue(record.getName().equals(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()));
|
assertTrue(createdComponent.getName().contains(createdComponent.getProperties().getIdentifier()));
|
||||||
assertEquals(createdComponent.getNodeType(), record.getNodeType());
|
assertEquals(createdComponent.getNodeType(), record.getNodeType());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user