diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/DeleteTaskVariableCoreTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/DeleteTaskVariableCoreTests.java index 824f80379..c2d464709 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/DeleteTaskVariableCoreTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/DeleteTaskVariableCoreTests.java @@ -18,7 +18,6 @@ import org.testng.annotations.Test; /** * @author bogdan.bocancea */ -@Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public class DeleteTaskVariableCoreTests extends RestTest { private UserModel userModel; @@ -37,6 +36,7 @@ public class DeleteTaskVariableCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Delete task variable with any user") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void deleteTaskVarialbleByAnyUser() throws Exception { restClient.authenticateUser(userModel); @@ -51,6 +51,7 @@ public class DeleteTaskVariableCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Delete task variable with invalid type") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void deleteTaskVariableInvalidType() throws Exception { restClient.authenticateUser(userModel); @@ -65,6 +66,7 @@ public class DeleteTaskVariableCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Delete task variable with invalid name") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void deleteTaskVariableInvalidName() throws Exception { restClient.authenticateUser(userModel); @@ -75,6 +77,7 @@ public class DeleteTaskVariableCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Create, update, delete task variable with any user") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void createUpdateDeleteTaskVarialbleByAnyUser() throws Exception { restClient.authenticateUser(userModel); @@ -92,6 +95,7 @@ public class DeleteTaskVariableCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Delete task variable by non assigned user") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void deleteTaskVarialbleByNonAssignedUser() throws Exception { UserModel nonAssigned = dataUser.createRandomTestUser(); @@ -105,6 +109,7 @@ public class DeleteTaskVariableCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Delete task variable by inexistent user") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void deleteTaskVarialbleByInexistentUser() throws Exception { RestVariableModel variableModel = RestVariableModel.getRandomTaskVariableModel("local", "d:text"); diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/DeleteTaskVariableSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/DeleteTaskVariableSanityTests.java index 8ef87934f..ccd18b85f 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/DeleteTaskVariableSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/DeleteTaskVariableSanityTests.java @@ -17,7 +17,6 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) public class DeleteTaskVariableSanityTests extends RestTest { private UserModel userModel, adminUser; @@ -39,6 +38,7 @@ public class DeleteTaskVariableSanityTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Delete existing task variable") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) public void deleteTaskVariable() throws Exception { restClient.authenticateUser(adminUser); @@ -53,6 +53,7 @@ public class DeleteTaskVariableSanityTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Try to delete existing task variable using invalid task id") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) public void tryToDeleteTaskVariableUsingInvalidTaskId() throws Exception { restClient.authenticateUser(adminUser); diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskFormModelCoreTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskFormModelCoreTests.java index 1e507afef..366a60ead 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskFormModelCoreTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskFormModelCoreTests.java @@ -20,7 +20,6 @@ import org.testng.annotations.Test; * @author bogdan.bocancea * */ -@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public class GetTaskFormModelCoreTests extends RestTest { UserModel userModel; @@ -40,6 +39,7 @@ public class GetTaskFormModelCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify that non involved user in task cannot get form models with Rest API and response is FORBIDDEN (403)") + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void nonInvolvedUserCannotGetTaskFormModels() throws Exception { taskModel = dataWorkflow.usingUser(userModel) @@ -55,6 +55,7 @@ public class GetTaskFormModelCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify user involved in task cannot get task form models with invalid task id") + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void getTaskFormModelsInvalidTaskId() throws Exception { taskModel = dataWorkflow.usingUser(userModel) @@ -70,6 +71,7 @@ public class GetTaskFormModelCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify user involved in task cannot get task form models with invalid task id") + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void getTaskFormModelsEmptyTaskId() throws Exception { taskModel = dataWorkflow.usingUser(userModel) @@ -85,6 +87,7 @@ public class GetTaskFormModelCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify user involved in task can get completed task form models") + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void getTaskFormModelsForCompletedTask() throws Exception { UserModel assignedUser = dataUser.createRandomTestUser(); diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/RemoveTaskItemCoreTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/RemoveTaskItemCoreTests.java new file mode 100644 index 000000000..8544a4576 --- /dev/null +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/RemoveTaskItemCoreTests.java @@ -0,0 +1,151 @@ +package org.alfresco.rest.workflow.tasks; + +import org.alfresco.dataprep.CMISUtil.DocumentType; +import org.alfresco.rest.RestTest; +import org.alfresco.rest.model.RestErrorModel; +import org.alfresco.rest.model.RestItemModel; +import org.alfresco.utility.model.FileModel; +import org.alfresco.utility.model.GroupModel; +import org.alfresco.utility.model.ProcessModel; +import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TaskModel; +import org.alfresco.utility.model.TestGroup; +import org.alfresco.utility.model.UserModel; +import org.alfresco.utility.testrail.ExecutionType; +import org.alfresco.utility.testrail.annotation.TestRail; +import org.springframework.http.HttpStatus; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +/** + * @author bogdan.bocancea + */ +public class RemoveTaskItemCoreTests extends RestTest +{ + private UserModel userWhoStartsTask, assigneeUser; + private SiteModel siteModel; + private FileModel fileModel, document2; + private TaskModel taskModel; + private RestItemModel taskItem; + + @BeforeClass(alwaysRun=true) + public void dataPreparation() throws Exception + { + userWhoStartsTask = dataUser.createRandomTestUser(); + siteModel = dataSite.usingUser(userWhoStartsTask).createPublicRandomSite(); + fileModel = dataContent.usingSite(siteModel).createContent(DocumentType.TEXT_PLAIN); + assigneeUser = dataUser.createRandomTestUser(); + } + + @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, + description = "Delete existing task item with empty task id") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) + public void deleteTaskItemEmptyTaskId() throws Exception + { + taskModel = dataWorkflow.usingUser(userWhoStartsTask).usingSite(siteModel).usingResource(fileModel).createNewTaskAndAssignTo(assigneeUser); + restClient.authenticateUser(userWhoStartsTask); + document2 = dataContent.usingSite(siteModel).createContent(DocumentType.XML); + taskItem = restClient.withWorkflowAPI().usingTask(taskModel).addTaskItem(document2); + taskModel.setId(""); + restClient.withWorkflowAPI().usingTask(taskModel).deleteTaskItem(taskItem); + restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND) + .assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, "")); + } + + @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, + description = "Delete existing task item with empty item id") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) + public void deleteTaskItemEmptyItemId() throws Exception + { + taskModel = dataWorkflow.usingUser(userWhoStartsTask).usingSite(siteModel).usingResource(fileModel).createNewTaskAndAssignTo(assigneeUser); + restClient.authenticateUser(userWhoStartsTask); + document2 = dataContent.usingSite(siteModel).createContent(DocumentType.XML); + taskItem = restClient.withWorkflowAPI().usingTask(taskModel).addTaskItem(document2); + taskItem.setId(""); + restClient.withWorkflowAPI().usingTask(taskModel).deleteTaskItem(taskItem); + restClient.assertStatusCodeIs(HttpStatus.METHOD_NOT_ALLOWED) + .assertLastError().containsSummary(RestErrorModel.DELETE_EMPTY_ARGUMENT); + } + + @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, + description = "Delete existing task item for completed task") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) + public void deleteTaskItemForCompletedTask() throws Exception + { + TaskModel completedTask = dataWorkflow.usingUser(userWhoStartsTask) + .usingSite(siteModel) + .usingResource(fileModel).createNewTaskAndAssignTo(assigneeUser); + restClient.authenticateUser(userWhoStartsTask); + document2 = dataContent.usingUser(userWhoStartsTask).usingSite(siteModel).createContent(DocumentType.XML); + taskItem = restClient.withWorkflowAPI().usingTask(completedTask).addTaskItem(document2); + dataWorkflow.usingUser(assigneeUser).taskDone(completedTask); + dataWorkflow.usingUser(userWhoStartsTask).taskDone(completedTask); + restClient.withWorkflowAPI().usingTask(completedTask).deleteTaskItem(taskItem); + restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND) + .assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, completedTask.getId())); + } + + @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, + description = "Delete existing task item with candidate user") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) + public void deleteTaskItemWithCandidateUser() throws Exception + { + GroupModel group = dataGroup.createRandomGroup(); + dataGroup.addListOfUsersToGroup(group, assigneeUser); + TaskModel groupTask = dataWorkflow.usingUser(userWhoStartsTask) + .usingSite(siteModel) + .usingResource(fileModel).createPooledReviewTaskAndAssignTo(group); + + restClient.authenticateUser(userWhoStartsTask); + document2 = dataContent.usingUser(userWhoStartsTask).usingSite(siteModel).createContent(DocumentType.XML); + taskItem = restClient.withWorkflowAPI().usingTask(groupTask).addTaskItem(document2); + restClient.authenticateUser(assigneeUser) + .withWorkflowAPI().usingTask(groupTask).deleteTaskItem(taskItem); + restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT); + } + + @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, + description = "Delete existing task item with unauthorized user") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) + public void deleteTaskItemWithUnauthorizedUser() throws Exception + { + taskModel = dataWorkflow.usingUser(userWhoStartsTask).usingSite(siteModel).usingResource(fileModel).createNewTaskAndAssignTo(assigneeUser); + UserModel unauthorizedUser = dataUser.createRandomTestUser(); + document2 = dataContent.usingSite(siteModel).createContent(DocumentType.XML); + taskItem = restClient.authenticateUser(userWhoStartsTask).withWorkflowAPI().usingTask(taskModel).addTaskItem(document2); + restClient.authenticateUser(unauthorizedUser).withWorkflowAPI().usingTask(taskModel).deleteTaskItem(taskItem); + restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN) + .assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED); + } + + @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, + description = "Delete existing task item with inexistent user") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) + public void deleteTaskItemWithInexistentUser() throws Exception + { + taskModel = dataWorkflow.usingUser(userWhoStartsTask).usingSite(siteModel).usingResource(fileModel).createNewTaskAndAssignTo(assigneeUser); + document2 = dataContent.usingSite(siteModel).createContent(DocumentType.XML); + taskItem = restClient.authenticateUser(userWhoStartsTask).withWorkflowAPI().usingTask(taskModel).addTaskItem(document2); + restClient.authenticateUser(UserModel.getRandomUserModel()).withWorkflowAPI().usingTask(taskModel).deleteTaskItem(taskItem); + restClient.assertStatusCodeIs(HttpStatus.UNAUTHORIZED); + } + + @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, + description = "Delete existing task item for deleted task") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) + public void deleteTaskItemFromDeletedProcess() throws Exception + { + ProcessModel deletedProcess = dataWorkflow.usingUser(userWhoStartsTask) + .usingSite(siteModel) + .usingResource(fileModel).createMoreReviewersWorkflowAndAssignTo(assigneeUser); + TaskModel task = restClient.authenticateUser(userWhoStartsTask) + .withWorkflowAPI().usingProcess(deletedProcess).getProcessTasks().getEntries().get(0).onModel(); + + document2 = dataContent.usingUser(userWhoStartsTask).usingSite(siteModel).createContent(DocumentType.XML); + taskItem = restClient.authenticateUser(userWhoStartsTask).withWorkflowAPI().usingTask(task).addTaskItem(document2); + dataWorkflow.usingUser(userWhoStartsTask).deleteProcess(deletedProcess); + restClient.withWorkflowAPI().usingTask(task).deleteTaskItem(taskItem); + restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND) + .assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, task.getId())); + } +} \ No newline at end of file diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/RemoveTaskItemSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/RemoveTaskItemSanityTests.java index fd5c62223..b98c28042 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/RemoveTaskItemSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/RemoveTaskItemSanityTests.java @@ -2,6 +2,7 @@ package org.alfresco.rest.workflow.tasks; import org.alfresco.dataprep.CMISUtil.DocumentType; import org.alfresco.rest.RestTest; +import org.alfresco.rest.model.RestErrorModel; import org.alfresco.rest.model.RestItemModel; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; @@ -17,7 +18,6 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) public class RemoveTaskItemSanityTests extends RestTest { private UserModel adminUser, userModel, userWhoStartsTask, assigneeUser; @@ -41,6 +41,7 @@ public class RemoveTaskItemSanityTests extends RestTest @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Delete existing task item") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) public void deleteTaskItem() throws Exception { restClient.authenticateUser(adminUser); @@ -56,6 +57,7 @@ public class RemoveTaskItemSanityTests extends RestTest @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Try to Delete existing task item using invalid taskId") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) public void deleteTaskItemUsingInvalidTaskId() throws Exception { restClient.authenticateUser(adminUser); @@ -64,11 +66,13 @@ public class RemoveTaskItemSanityTests extends RestTest taskItem = restClient.withWorkflowAPI().usingTask(taskModel).addTaskItem(document2); taskModel.setId("invalidTaskId"); restClient.withWorkflowAPI().usingTask(taskModel).deleteTaskItem(taskItem); - restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND); + restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND) + .assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, "invalidTaskId")); } @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Try to Delete existing task item using invalid itemId") + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) public void deleteTaskItemUsingInvalidItemId() throws Exception { restClient.authenticateUser(adminUser); @@ -76,6 +80,7 @@ public class RemoveTaskItemSanityTests extends RestTest taskItem = restClient.withWorkflowAPI().usingTask(taskModel).addTaskItem(document2); taskItem.setId("incorrectItemId"); restClient.withWorkflowAPI().usingTask(taskModel).deleteTaskItem(taskItem); - restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND); + restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND) + .assertLastError().containsSummary(String.format(RestErrorModel.PROCESS_ENTITY_NOT_FOUND, "incorrectItemId")); } } \ No newline at end of file diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskVariableCoreTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskVariableCoreTests.java index d4dfcfeeb..97b1dcc70 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskVariableCoreTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskVariableCoreTests.java @@ -18,7 +18,6 @@ import org.testng.annotations.Test; /** * @author bogdan.bocancea */ -@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public class UpdateTaskVariableCoreTests extends RestTest { private UserModel userModel; @@ -41,6 +40,7 @@ public class UpdateTaskVariableCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Update task variable by user who started the process") + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void updateTaskVariableByUserWhoStartedProcess() throws Exception { variableModel = RestVariableModel.getRandomTaskVariableModel("local", "d:text"); @@ -58,6 +58,7 @@ public class UpdateTaskVariableCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Update task variable with symbols in name") + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void updateTaskVariableWithSymbolsInName() throws Exception { String symbolName = "<>.,;-'+=%|[]#*&-+"; @@ -74,6 +75,7 @@ public class UpdateTaskVariableCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Update task variable with invalid task id") + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void updateTaskVariableWithInvalidTaskId() throws Exception { TaskModel invalidTask = new TaskModel(userModel.getUsername()); @@ -87,6 +89,7 @@ public class UpdateTaskVariableCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Update task variable with invalid scope") + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void updateTaskVariableWithInvalidScope() throws Exception { variableModel = RestVariableModel.getRandomTaskVariableModel("local", "d:text"); @@ -102,6 +105,7 @@ public class UpdateTaskVariableCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Update task variable with invalid type") + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void updateTaskVariableWithInvalidType() throws Exception { variableModel = RestVariableModel.getRandomTaskVariableModel("local", "d:text"); @@ -117,6 +121,7 @@ public class UpdateTaskVariableCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Update task variable with symbols in value") + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void updateTaskVariableWithSymbolsInValue() throws Exception { String symbolValue = "<>.,;-'+=%|[]#*&-+/\\#!@"; @@ -133,6 +138,7 @@ public class UpdateTaskVariableCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Update task variable by non assigned user") + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void updateTaskVariableByNonAssignedUser() throws Exception { UserModel nonAssigned = dataUser.createRandomTestUser(); @@ -149,6 +155,7 @@ public class UpdateTaskVariableCoreTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Update task variable by inexistent user") + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) public void updateTaskVariableByInexistentser() throws Exception { variableModel = RestVariableModel.getRandomTaskVariableModel("local", "d:text"); diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskVariableSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskVariableSanityTests.java index 35d09eb6a..fd1419c4e 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskVariableSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskVariableSanityTests.java @@ -17,7 +17,6 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) public class UpdateTaskVariableSanityTests extends RestTest { private UserModel userModel; @@ -45,6 +44,7 @@ public class UpdateTaskVariableSanityTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Create non-existing task variable") + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) public void createTaskVariable() throws Exception { restClient.authenticateUser(adminUser); @@ -60,6 +60,7 @@ public class UpdateTaskVariableSanityTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Update existing task variable") + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) public void updateExistingTaskVariable() throws Exception { restClient.authenticateUser(adminUser); @@ -78,9 +79,10 @@ public class UpdateTaskVariableSanityTests extends RestTest taskVariable.assertThat().field("value").is("updatedValue"); } - @Test(groups = {TestGroup.NETWORKS }) + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY, TestGroup.NETWORKS}) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Update existing task variable by admin in the same network") + public void updateTaskVariableByAdminInSameNetwork() throws Exception { restClient.authenticateUser(adminUser);