mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
added 2 methods for verify entries order and added one full test for getPeople
This commit is contained in:
@@ -43,6 +43,33 @@ public class GetPeopleFullTests extends RestTest
|
||||
.and().field("firstName").is(managerUser.getUsername() + " FirstName")
|
||||
.and().field("email").is(managerUser.getUsername() + domain)
|
||||
.and().field("emailNotificationsEnabled").is("true");
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
|
||||
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify entry details for get person response with Rest API")
|
||||
public void checkResponseSchemaForGetPerson() throws Exception
|
||||
{
|
||||
RestPersonModel newUser = RestPersonModel.getRandomPersonModel("aspectNames", "avatarId", "statusUpdatedAt");
|
||||
newUser = restClient.authenticateUser(adminUser).withCoreAPI().usingAuthUser().createPerson(newUser);
|
||||
restClient.assertStatusCodeIs(HttpStatus.CREATED);
|
||||
|
||||
personModel = restClient.authenticateUser(userModel).withCoreAPI().usingUser(new UserModel(newUser.getId(), newUser.getPassword())).getPerson();
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
|
||||
personModel.assertThat().field("id").is(newUser.getId())
|
||||
.and().field("firstName").is(newUser.getFirstName())
|
||||
.and().field("lastName").is(newUser.getLastName())
|
||||
.and().field("description").is(newUser.getDescription())
|
||||
.and().field("email").is(newUser.getEmail())
|
||||
.and().field("skypeId").is(newUser.getSkypeId())
|
||||
.and().field("googleId").is(newUser.getGoogleId())
|
||||
.and().field("instantMessageId").is(newUser.getInstantMessageId())
|
||||
.and().field("jobTitle").is(newUser.getJobTitle())
|
||||
.and().field("location").is(newUser.getLocation())
|
||||
.and().field("mobile").is(newUser.getMobile())
|
||||
.and().field("telephone").is(newUser.getTelephone())
|
||||
.and().field("userStatus").is(newUser.getUserStatus())
|
||||
.and().field("enabled").is(newUser.getEnabled())
|
||||
.and().field("emailNotificationsEnabled").is(newUser.getEmailNotificationsEnabled());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,9 +57,12 @@ public class GetTasksCoreTests extends RestTest
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE })
|
||||
public void orderByParameterApplied() throws Exception
|
||||
{
|
||||
taskModels = restClient.authenticateUser(dataUser.getAdminUser()).withParams("orderBy=id").withWorkflowAPI().getTasks();
|
||||
|
||||
|
||||
taskModels = restClient.authenticateUser(dataUser.getAdminUser()).withParams("orderBy=id DESC").withWorkflowAPI().getTasks();
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
taskModels.assertThat().entriesListIsNotEmpty();
|
||||
taskModels.assertThat().entriesListIsNotEmpty().
|
||||
and().entriesListIsSortedAscBy("id");
|
||||
List<RestTaskModel> tasksList = taskModels.getEntries();
|
||||
List<String> taskIds = new ArrayList<String>();
|
||||
for(RestTaskModel task: tasksList)
|
||||
|
||||
Reference in New Issue
Block a user