mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
PR 1412 code review comments [skip tests]
This commit is contained in:
@@ -116,6 +116,8 @@ public class FilePlanTests extends BaseRMRestTest
|
||||
* </pre>
|
||||
*/
|
||||
@Test (priority = 1)
|
||||
// Set priority to 1 in order for this test to run last one in this class. The rm site is created only once at the
|
||||
// beginning of the class and because this test deletes the rm site, the other tests might be affected
|
||||
public void getFilePlanWhenRMIsNotCreated()
|
||||
{
|
||||
RMSiteAPI rmSiteAPI = getRestAPIFactory().getRMSiteAPI();
|
||||
|
@@ -97,13 +97,14 @@ public class ReadRecordTests extends BaseRMRestTest
|
||||
.nodeType(NON_ELECTRONIC_RECORD_TYPE)
|
||||
.build();
|
||||
|
||||
private RecordCategory rootCategory;
|
||||
private RecordCategory rootCategory, rootCategory2;
|
||||
private RecordCategoryChild recordFolder;
|
||||
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void setupReadRecordTests()
|
||||
{
|
||||
rootCategory = createRootCategory(getRandomName("rootCategory"));
|
||||
rootCategory2 = createRootCategory(getRandomName("rootCategory2"));
|
||||
recordFolder = createRecordFolder(rootCategory.getId(), getRandomName("recFolder"));
|
||||
}
|
||||
/**
|
||||
@@ -244,7 +245,6 @@ public class ReadRecordTests extends BaseRMRestTest
|
||||
|
||||
String RECORD_ELECTRONIC = "Record " + getRandomAlphanumeric();
|
||||
String RECORD_ELECTRONIC_BINARY = "Binary Record" + getRandomAlphanumeric();
|
||||
String existentRecordCategoryId = createRootCategory(getRandomName("rootCategory2")).getId();
|
||||
|
||||
String RELATIVE_PATH = "/" + CATEGORY_NAME + getRandomAlphanumeric() + "/folder";
|
||||
|
||||
@@ -255,7 +255,7 @@ public class ReadRecordTests extends BaseRMRestTest
|
||||
.relativePath(RELATIVE_PATH)
|
||||
.build();
|
||||
RecordCategoryAPI recordCategoryAPI = getRestAPIFactory().getRecordCategoryAPI();
|
||||
String folderId = recordCategoryAPI.createRecordCategoryChild(recordFolder, existentRecordCategoryId).getId();
|
||||
String folderId = recordCategoryAPI.createRecordCategoryChild(recordFolder, rootCategory2.getId()).getId();
|
||||
|
||||
// text file as an electronic record
|
||||
Record recordText = Record.builder()
|
||||
@@ -346,6 +346,7 @@ public class ReadRecordTests extends BaseRMRestTest
|
||||
public void cleanupReadRecordTests()
|
||||
{
|
||||
deleteRecordCategory(rootCategory.getId());
|
||||
deleteRecordCategory(rootCategory2.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -72,6 +72,7 @@ public class RMSiteTests extends BaseRMRestTest
|
||||
* Then the RM site is created
|
||||
*/
|
||||
@Test (description = "Create RM site with Standard Compliance as admin user", priority = 2)
|
||||
// Run after createRMSiteAsAnotherAdminUser. In this way the Dod site is deleted and standard site is created for the rest of the tests
|
||||
public void createRMSiteAsAdminUser()
|
||||
{
|
||||
RMSiteAPI rmSiteAPI = getRestAPIFactory().getRMSiteAPI();
|
||||
@@ -104,6 +105,7 @@ public class RMSiteTests extends BaseRMRestTest
|
||||
* Then the response code 409 (Site with the given identifier already exists) is return
|
||||
*/
|
||||
@Test (description = "Create RM site when site already exist with admin user", priority = 3)
|
||||
// Run test after the other tests with priority 0, 1 or 2
|
||||
public void createRMSiteWhenSiteExists()
|
||||
{
|
||||
// Create the RM site if it does not exist
|
||||
@@ -145,6 +147,7 @@ public class RMSiteTests extends BaseRMRestTest
|
||||
* Then RM site details are returned
|
||||
*/
|
||||
@Test (description = "GET the RM site as admin user", priority = 3)
|
||||
// Run test after the tests with priority 0, 1 or 2
|
||||
public void getRMSite()
|
||||
{
|
||||
RMSiteAPI rmSiteAPI = getRestAPIFactory().getRMSiteAPI();
|
||||
@@ -175,6 +178,7 @@ public class RMSiteTests extends BaseRMRestTest
|
||||
* When the user wants to create a RM site with DOD compliance
|
||||
* Then RM site is created
|
||||
*/
|
||||
// Run test after deleteRMSite. In this way rmSiteAPI.deleteRMSite isn't called because site is already deleted
|
||||
@Test (description = "Create RM site with DOD compliance as an another admin user", priority = 1)
|
||||
@Bug (id="RM-4289")
|
||||
public void createRMSiteAsAnotherAdminUser()
|
||||
@@ -213,7 +217,7 @@ public class RMSiteTests extends BaseRMRestTest
|
||||
* When the admin user wants to update the RM site details (title or description)
|
||||
* Then RM site details are updated
|
||||
*/
|
||||
@Test(priority = 3)
|
||||
@Test(priority = 3) // Run test after the other tests with priority 0, 1 or 2
|
||||
public void updateRMSiteDetails()
|
||||
{
|
||||
String NEW_TITLE = RM_TITLE + RandomData.getRandomAlphanumeric();
|
||||
@@ -250,7 +254,7 @@ public class RMSiteTests extends BaseRMRestTest
|
||||
* When the admin user wants to update the RM site compliance
|
||||
* Then RM site compliance is not updated
|
||||
*/
|
||||
@Test(priority = 3)
|
||||
@Test(priority = 3) // Run test after the other tests with priority 0, 1 or 2
|
||||
public void updateRMSiteComplianceAsAdmin()
|
||||
{
|
||||
// Create the RM site if it does not exist
|
||||
|
@@ -70,7 +70,7 @@ public class RMSiteUtil
|
||||
* @param compliance The RM site compliance
|
||||
* @return The {@link RMSite} with the given details
|
||||
*/
|
||||
public static RMSite createRMSiteModel(RMSiteCompliance compliance)
|
||||
private static RMSite createRMSiteModel(RMSiteCompliance compliance)
|
||||
{
|
||||
return createRMSiteModel(compliance, RM_TITLE, RM_DESCRIPTION);
|
||||
}
|
||||
|
Reference in New Issue
Block a user