test- fixed issues

This commit is contained in:
mionescu
2017-02-22 11:21:14 +02:00
parent 54faf6d5e4
commit 169d6aa5bd
4 changed files with 8 additions and 7 deletions
@@ -157,9 +157,9 @@ public class DeleteCommentFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND).assertLastError().containsSummary(file.getNodeRef() + " was not found");
}
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.NETWORKS }, executionType = ExecutionType.REGRESSION,
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS}, executionType = ExecutionType.REGRESSION,
description = "Verify deleteComment from node with invalid network id returns status code 401")
@Test(groups = { TestGroup.REST_API, TestGroup.NETWORKS, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void deleteCommentWithInvalidNetworkId() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -165,7 +165,7 @@ public class AddProcessItemCoreTests extends RestTest
.field("createdBy").is(adminUser.getUsername()).and()
.field("modifiedAt").isNotEmpty().and()
.field("name").is(document.getName()).and()
.field("modifiedBy").is(userWhoStartsProcess.getUsername()).and()
.field("modifiedBy").is(adminUser.getUsername()).and()
.field("id").isNotEmpty().and()
.field("mimeType").is(document.getFileType().mimeType);
processItems.getEntries().get(1).onModel().assertThat()
@@ -174,7 +174,7 @@ public class AddProcessItemCoreTests extends RestTest
.field("createdBy").is(adminUser.getUsername()).and()
.field("modifiedAt").isNotEmpty().and()
.field("name").is(document2.getName()).and()
.field("modifiedBy").is(userWhoStartsProcess.getUsername()).and()
.field("modifiedBy").is(adminUser.getUsername()).and()
.field("id").isNotEmpty().and()
.field("mimeType").is(document2.getFileType().mimeType);
}
@@ -42,7 +42,8 @@ public class DeleteProcessItemFullTests extends RestTest
@BeforeMethod(alwaysRun = true)
public void createProcess() throws Exception
{
TaskModel task = dataWorkflow.usingUser(userWhoStartsProcess).usingSite(siteModel).usingResource(document).createNewTaskAndAssignTo(assignee);
TaskModel task = dataWorkflow.usingUser(userWhoStartsProcess).usingSite(siteModel).usingResource(document)
.createNewTaskAndAssignTo(assignee);
processModel = new ProcessModel();
processModel.setId(task.getProcessId());
processModel = restClient.authenticateUser(adminUser).withWorkflowAPI().usingProcess(processModel).getProcess();
@@ -410,7 +410,7 @@ public class AddProcessVariablesFullTests extends RestTest
.createNewTaskAndAssignTo(tenantUserAssignee);
variableModel = RestProcessVariableModel.getRandomProcessVariableModel("d:text");
processModel = restClient.withWorkflowAPI().getProcesses().getOneRandomEntry().onModel();
processModel = restClient.authenticateUser(tenantUser).withWorkflowAPI().addProcess("activitiAdhoc", tenantUserAssignee, false, Priority.Normal);
processVariable = restClient.authenticateUser(adminTenantUser2).withWorkflowAPI().usingProcess(processModel)
.addProcessVariable(variableModel);
@@ -441,7 +441,7 @@ public class AddProcessVariablesFullTests extends RestTest
variableModel = RestProcessVariableModel.getRandomProcessVariableModel("d:text");
variableModel1 = RestProcessVariableModel.getRandomProcessVariableModel("d:text");
processModel = restClient.withWorkflowAPI().getProcesses().getOneRandomEntry().onModel();
processModel = restClient.authenticateUser(tenantUser).withWorkflowAPI().addProcess("activitiAdhoc", tenantUserAssignee, false, Priority.Normal);
restClient.authenticateUser(adminTenantUser2).withWorkflowAPI().usingProcess(processModel)
.addProcessVariables(variableModel, variableModel1);