mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
APPS-995 Refactor DispositionScheduleLinkedRecordsTest in order to create prec… (#448)
* Refactor DispositionScheduleLinkedRecordsTest in order to create precondition through rest api [ags][skip repo][skip share][skip db][skip tas] * code review comments [ags][skip repo][skip share][skip db][skip tas] * code review comments [ags][skip repo][skip share][skip db][skip tas]
This commit is contained in:
@@ -271,8 +271,8 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
||||
RecordCategory categoryWithRS = getRestAPIFactory().getRecordCategoryAPI()
|
||||
.getRecordCategory(recordFolder.getParentId());
|
||||
dispositionScheduleService.createCategoryRetentionSchedule(categoryWithRS.getName(), false);
|
||||
dispositionScheduleService.addCutOffAfterPeriodStep(categoryWithRS.getName(), "immediately");
|
||||
dispositionScheduleService.addDestroyWithGhostingAfterPeriodStep(categoryWithRS.getName(), "immediately");
|
||||
dispositionScheduleService.addCutOffImmediatelyStep(categoryWithRS.getName());
|
||||
dispositionScheduleService.addDestroyWithGhostingImmediatelyAfterCutOff(categoryWithRS.getName());
|
||||
|
||||
STEP("Check the record folder has a disposition schedule");
|
||||
RecordFolder folderWithRS = getRestAPIFactory().getRecordFolderAPI().getRecordFolder(recordFolder.getId());
|
||||
@@ -297,7 +297,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
||||
categoryWithRS = createRootCategory(getRandomName("CategoryWithRS"));
|
||||
dispositionScheduleService.createCategoryRetentionSchedule(categoryWithRS.getName(), true);
|
||||
dispositionScheduleService.addRetainAfterPeriodStep(categoryWithRS.getName(), "immediately");
|
||||
dispositionScheduleService.addDestroyWithGhostingAfterPeriodStep(categoryWithRS.getName(), "immediately");
|
||||
dispositionScheduleService.addDestroyWithGhostingImmediatelyAfterCutOff(categoryWithRS.getName());
|
||||
|
||||
STEP("Create record folder with a record.");
|
||||
RecordCategoryChild folder = createFolder(categoryWithRS.getId(), getRandomName("RecFolder"));
|
||||
@@ -325,5 +325,4 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
||||
deleteRecordCategory(recordFolder.getParentId());
|
||||
deleteRecordCategory(categoryWithRS.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -64,7 +64,7 @@ public class AutomaticDispositionTest extends BaseRMRestTest
|
||||
dispositionScheduleService.createCategoryRetentionSchedule(categoryWithRSOnRecords.getName(), true);
|
||||
|
||||
STEP("Add retention schedule cut off step with immediate period.");
|
||||
dispositionScheduleService.addCutOffAfterPeriodStep(categoryWithRSOnRecords.getName(), "immediately");
|
||||
dispositionScheduleService.addCutOffImmediatelyStep(categoryWithRSOnRecords.getName());
|
||||
|
||||
STEP("Create a record folder with a record");
|
||||
RecordCategoryChild recordFolder = createRecordFolder(categoryWithRSOnRecords.getId(), getRandomName
|
||||
|
@@ -65,7 +65,7 @@ public class DispositionScheduleInheritanceTests extends BaseRMRestTest
|
||||
dispositionScheduleService.createCategoryRetentionSchedule(rootCategory.getName(), true);
|
||||
|
||||
STEP("Add retention schedule cut off step with immediate period.");
|
||||
dispositionScheduleService.addCutOffAfterPeriodStep(rootCategory.getName(), "immediately");
|
||||
dispositionScheduleService.addCutOffImmediatelyStep(rootCategory.getName());
|
||||
|
||||
STEP("Add retention schedule retain step with immediate period.");
|
||||
dispositionScheduleService.addRetainAfterPeriodStep(rootCategory.getName(), "immediately");
|
||||
@@ -101,7 +101,7 @@ public class DispositionScheduleInheritanceTests extends BaseRMRestTest
|
||||
dispositionScheduleService.createCategoryRetentionSchedule(rootCategory.getName(), false);
|
||||
|
||||
STEP("Add retention schedule cut off step with immediate period.");
|
||||
dispositionScheduleService.addCutOffAfterPeriodStep(rootCategory.getName(), "immediately");
|
||||
dispositionScheduleService.addCutOffImmediatelyStep(rootCategory.getName());
|
||||
|
||||
STEP("Add retention schedule retain step with immediate period.");
|
||||
dispositionScheduleService.addRetainAfterPeriodStep(rootCategory.getName(), "immediately");
|
||||
@@ -133,7 +133,7 @@ public class DispositionScheduleInheritanceTests extends BaseRMRestTest
|
||||
dispositionScheduleService.createCategoryRetentionSchedule(rootCategory.getName(), true);
|
||||
|
||||
STEP("Add retention schedule cut off step with immediate period.");
|
||||
dispositionScheduleService.addCutOffAfterPeriodStep(rootCategory.getName(), "immediately");
|
||||
dispositionScheduleService.addCutOffImmediatelyStep(rootCategory.getName());
|
||||
|
||||
STEP("Create a subcategory with retention schedule and apply it to records.");
|
||||
RecordCategoryChild subCategory1 = createRecordCategory(rootCategory.getId(), getRandomName("subCategory"));
|
||||
@@ -189,7 +189,7 @@ public class DispositionScheduleInheritanceTests extends BaseRMRestTest
|
||||
dispositionScheduleService.createCategoryRetentionSchedule(subcategory1Path, false);
|
||||
|
||||
STEP("Add retention schedule cut off step with immediate period.");
|
||||
dispositionScheduleService.addCutOffAfterPeriodStep(subcategory1Path, "immediately");
|
||||
dispositionScheduleService.addCutOffImmediatelyStep(subcategory1Path);
|
||||
|
||||
STEP("Create a subcategory2 with a record folder in subcategory1");
|
||||
RecordCategoryChild subCategory2 = createRecordCategory(subCategory1.getId(), getRandomName("subCategory"));
|
||||
@@ -220,7 +220,7 @@ public class DispositionScheduleInheritanceTests extends BaseRMRestTest
|
||||
dispositionScheduleService.createCategoryRetentionSchedule(rootCategory.getName(), false);
|
||||
|
||||
STEP("Add retention schedule cut off step with immediate period.");
|
||||
dispositionScheduleService.addCutOffAfterPeriodStep(rootCategory.getName(), "immediately");
|
||||
dispositionScheduleService.addCutOffImmediatelyStep(rootCategory.getName());
|
||||
|
||||
STEP("Create a subcategory with retention schedule and apply it to records.");
|
||||
RecordCategoryChild subCategory = createRecordCategory(rootCategory.getId(), getRandomName("subCategory"));
|
||||
@@ -267,7 +267,7 @@ public class DispositionScheduleInheritanceTests extends BaseRMRestTest
|
||||
dispositionScheduleService.createCategoryRetentionSchedule(rootCategory.getName(), true);
|
||||
|
||||
STEP("Add retention schedule cut off step with immediate period.");
|
||||
dispositionScheduleService.addCutOffAfterPeriodStep(rootCategory.getName(), "immediately");
|
||||
dispositionScheduleService.addCutOffImmediatelyStep(rootCategory.getName());
|
||||
|
||||
STEP("Create a subcategory with retention schedule and apply it to record folders.");
|
||||
RecordCategoryChild subCategory = createRecordCategory(rootCategory.getId(), getRandomName("subCategory"));
|
||||
|
@@ -29,6 +29,7 @@ package org.alfresco.rest.rm.community.records;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.UNFILED_RECORDS_CONTAINER_ALIAS;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.NON_ELECTRONIC_RECORD_TYPE;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.UNFILED_RECORD_FOLDER_TYPE;
|
||||
import static org.alfresco.rest.rm.community.model.recordcategory.RetentionPeriodProperty.CUT_OFF_DATE;
|
||||
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_FILING;
|
||||
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_MANAGER;
|
||||
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_POWER_USER;
|
||||
@@ -310,8 +311,8 @@ public class DeleteRecordTests extends BaseRMRestTest
|
||||
dispositionScheduleService.createCategoryRetentionSchedule(recordCategory.getName(), true);
|
||||
|
||||
STEP("Add retention schedule cut off and destroy step with immediate period.");
|
||||
dispositionScheduleService.addCutOffAfterPeriodStep(recordCategory.getName(), "immediately");
|
||||
dispositionScheduleService.addDestroyWithGhostingAfterPeriodStep(recordCategory.getName(), "immediately");
|
||||
dispositionScheduleService.addCutOffImmediatelyStep(recordCategory.getName());
|
||||
dispositionScheduleService.addDestroyWithGhostingImmediatelyAfterCutOff(recordCategory.getName());
|
||||
|
||||
STEP("Create a record folder and file the record");
|
||||
RecordCategoryChild recFolder = createFolder(recordCategory.getId(), getRandomName("recFolder"));
|
||||
|
Reference in New Issue
Block a user