mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
TAS-863 getComment created by another user
This commit is contained in:
@@ -103,4 +103,17 @@ public class GetCommentsTest extends RestTest
|
||||
userModel.setPassword("password");
|
||||
restClient.authenticateUser(userModel);
|
||||
}
|
||||
|
||||
@TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY,
|
||||
description= "Verify Manager user gets comments created by another user and status code is 200")
|
||||
public void managerIsAbleToRetrieveCommentsCreatedByAnotherUser() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
userModel = usersWithRoles.get(UserRole.SiteCollaborator);
|
||||
restClient.authenticateUser(userModel);
|
||||
commentsAPI.addComment(document.getNodeRef(), "This is a new comment added by " + userModel.getUsername());
|
||||
commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED.toString());
|
||||
restClient.authenticateUser(usersWithRoles.get(UserRole.SiteManager));
|
||||
commentsAPI.getNodeComments(document.getNodeRef());
|
||||
commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK.toString());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user