bug: fixed failedAddingProcessItemIfInvalidProcessIdIsProvided and

getProcessVariablesUsingEmptyProcessId
This commit is contained in:
Alecsandru Prună
2017-01-25 16:08:54 +02:00
parent 79a2aaeff8
commit 775f268812
2 changed files with 3 additions and 7 deletions
@@ -113,7 +113,6 @@ public class AddProcessItemCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.PROCESSES }, executionType = ExecutionType.REGRESSION,
description = "Adding process item is falling in case of invalid process id is provided")
@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.PROCESSES, TestGroup.CORE })
@Bug(id="AUTOMATION", description="Please fix this issue. It seems it's failing with 400 or 404 error code on 5.2")
public void failedAddingProcessItemIfInvalidProcessIdIsProvided() throws Exception
{
RestProcessModelsCollection processes = restClient.authenticateUser(adminUser).withParams("maxItems=1").withWorkflowAPI().getProcesses();
@@ -156,5 +155,4 @@ public class AddProcessItemCoreTests extends RestTest
restClient.processModel(RestItemModel.class, request);
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST).assertLastError().containsSummary(String.format(RestErrorModel.REQUIRED_TO_ADD, "itemId"));
}
}
@@ -93,13 +93,12 @@ public class GetProcessVariablesCoreTests extends RestTest
@TestRail(section = {TestGroup.REST_API, TestGroup.PROCESSES }, executionType = ExecutionType.REGRESSION,
description = "Get process variables using empty process ID")
@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.PROCESSES, TestGroup.CORE })
@Bug(id="AUTOMATION", description="Please fix this automated test")
public void getProcessVariablesUsingEmptyProcessId() throws JsonToModelConversionException, Exception
{
processModel = restClient.authenticateUser(userWhoStartsTask).withParams("maxItems=2").withWorkflowAPI().getProcesses().getOneRandomEntry().onModel();
processModel.setId(" /");
processModel.setId("");
variables = restClient.withWorkflowAPI().usingProcess(processModel).getProcessVariables();
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND).assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, " "));
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND).assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, ""));
}
@TestRail(section = {TestGroup.REST_API, TestGroup.PROCESSES }, executionType = ExecutionType.REGRESSION,
@@ -117,5 +116,4 @@ public class GetProcessVariablesCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.OK);
variables.assertThat().entriesListIsNotEmpty();
}
}
}