mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
TAS-972 created test: getPerson call test with Collaborator role
This commit is contained in:
@@ -3,7 +3,6 @@ package org.alfresco.rest.people;
|
||||
import org.alfresco.rest.RestTest;
|
||||
import org.alfresco.rest.requests.RestPeopleApi;
|
||||
import org.alfresco.utility.constants.UserRole;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
@@ -44,4 +43,16 @@ public class GetPeopleTest extends RestTest
|
||||
peopleApi.getPerson(searchedUser.getUsername());
|
||||
peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK.toString());
|
||||
}
|
||||
|
||||
@Test(groups = "sanity")
|
||||
@TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets a person with Rest API and response is successful")
|
||||
public void collaboratorUserChecksIfPersonIsPresent() throws Exception
|
||||
{
|
||||
UserModel collaboratorUser = dataUser.usingAdmin().createRandomTestUser();
|
||||
dataUser.usingUser(userModel).addUserToSite(collaboratorUser, siteModel, UserRole.SiteCollaborator);
|
||||
|
||||
restClient.authenticateUser(collaboratorUser);
|
||||
peopleApi.getPerson(searchedUser.getUsername());
|
||||
peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK.toString());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user