fix getOneRandomEntry

This commit is contained in:
Paul Brodner
2016-10-17 22:34:45 +03:00
parent f03c133570
commit 3bacbd4247
6 changed files with 8 additions and 8 deletions
@@ -19,7 +19,7 @@ import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.SANITY, TestGroup.SANITY })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public class AddCommentSanityTests extends RestTest
{
@Autowired
@@ -23,7 +23,7 @@ import org.testng.annotations.Test;
/**
* Created by Claudia Agache on 10/10/2016.
*/
@Test(groups = { TestGroup.REST_API, TestGroup.SANITY, TestGroup.SANITY })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public class AddCommentsSanityTests extends RestTest
{
@Autowired RestCommentsApi commentsAPI;
@@ -20,7 +20,7 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.SANITY, TestGroup.SANITY })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public class DeleteCommentsSanityTests extends RestTest
{
@@ -19,7 +19,7 @@ import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.SANITY, TestGroup.SANITY })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public class GetCommentsSanityTests extends RestTest
{
@Autowired
@@ -21,7 +21,7 @@ import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.SANITY, TestGroup.SANITY })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public class UpdateCommentsSanityTests extends RestTest
{
@Autowired
@@ -54,7 +54,7 @@ public class UpdateProcessVariableSanityTests extends RestWorkflowTest
{
restClient.authenticateUser(adminUser);
RestProcessVariableModel variableModel = RestProcessVariableModel.getRandomProcessVariableModel("d:text");
processModel = processesApi.getProcesses().getOneEntry();
processModel = processesApi.getProcesses().getOneRandomEntry();
processesApi.updateProcessVariable(processModel, variableModel);
processesApi.getProcessesVariables(processModel).assertProcessVariableExists(variableModel);
processesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK);
@@ -66,7 +66,7 @@ public class UpdateProcessVariableSanityTests extends RestWorkflowTest
{
restClient.authenticateUser(adminUser);
RestProcessVariableModel variableModel = RestProcessVariableModel.getRandomProcessVariableModel("d:text");
processModel = processesApi.getProcesses().getOneEntry();
processModel = processesApi.getProcesses().getOneRandomEntry();
processesApi.addProcessVariable(processModel, variableModel);
variableModel.setValue("newValue");
processesApi.updateProcessVariable(processModel, variableModel).assertProcessVariableHasValue("newValue");
@@ -79,7 +79,7 @@ public class UpdateProcessVariableSanityTests extends RestWorkflowTest
{
restClient.authenticateUser(adminUser);
RestProcessVariableModel variableModel = RestProcessVariableModel.getRandomProcessVariableModel("d:text");
processModel = processesApi.getProcesses().getOneEntry();
processModel = processesApi.getProcesses().getOneRandomEntry();
processModel.onModel().setId("abc");
processesApi.updateProcessVariable(processModel, variableModel);
processesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.NOT_FOUND);