tests updates, remove FIXME notes

add a check for the issue RM-4372
This commit is contained in:
Rodica Sutu
2017-05-16 15:18:24 +03:00
parent 45ae6ce940
commit d5faebc9f3
5 changed files with 14 additions and 11 deletions

View File

@@ -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
{
/*************************/

View File

@@ -187,7 +187,9 @@ public interface TestData
{ RECORD_CATEGORY_TYPE },
{ RECORD_FOLDER_TYPE },
{ TRANSFER_CONTAINER_TYPE },
{ UNFILED_CONTAINER_TYPE }
{ TRANSFER_TYPE },
{ UNFILED_CONTAINER_TYPE },
};
}
}

View File

@@ -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());
}

View File

@@ -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

View File

@@ -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());