mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
bug: fixed tests described in TAS-2887
This commit is contained in:
@@ -116,10 +116,11 @@ public class AddProcessItemCoreTests extends RestTest
|
||||
public void failedAddingProcessItemIfInvalidProcessIdIsProvided() throws Exception
|
||||
{
|
||||
RestProcessModelsCollection processes = restClient.authenticateUser(adminUser).withParams("maxItems=1").withWorkflowAPI().getProcesses();
|
||||
processModel= processes.assertThat().entriesListIsNotEmpty().when().getOneRandomEntry().onModel();
|
||||
processModel = processes.assertThat().entriesListIsNotEmpty().when().getOneRandomEntry().onModel();
|
||||
FileModel testDocument = dataContent.usingAdmin().usingSite(siteModel).createContent(DocumentType.TEXT_PLAIN);
|
||||
|
||||
processModel.setId("invalidProcessId");
|
||||
processItem = restClient.withWorkflowAPI().usingProcess(processModel).addProcessItem(document);
|
||||
processItem = restClient.withWorkflowAPI().usingProcess(processModel).addProcessItem(testDocument);
|
||||
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND).assertLastError()
|
||||
.containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, "invalidProcessId"));
|
||||
}
|
||||
|
||||
@@ -106,6 +106,15 @@ public class GetProcessVariablesCoreTests extends RestTest
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.PROCESSES, TestGroup.CORE })
|
||||
public void getProcessVariablesForADeletedProcess() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
SiteModel siteModel = dataSite.usingUser(userWhoStartsTask).createPublicRandomSite();
|
||||
UserModel userWhoStartsTask = dataUser.createRandomTestUser();
|
||||
UserModel assignee = dataUser.createRandomTestUser();
|
||||
FileModel document = dataContent.usingSite(siteModel).createContent(DocumentType.TEXT_PLAIN);
|
||||
RestProcessModel processModel;
|
||||
RestProcessVariableCollection variables;
|
||||
|
||||
dataWorkflow.usingUser(userWhoStartsTask).usingSite(siteModel).usingResource(document).createNewTaskAndAssignTo(assignee);
|
||||
|
||||
processModel = restClient.authenticateUser(userWhoStartsTask).withParams("maxItems=2").withWorkflowAPI().getProcesses().getOneRandomEntry().onModel();
|
||||
restClient.authenticateUser(admin).withWorkflowAPI().usingProcess(processModel).deleteProcess();
|
||||
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
|
||||
|
||||
Reference in New Issue
Block a user