TAS-863 getComment created by another user

This commit is contained in:
Cristina Jalba
2016-09-27 16:39:22 +03:00
parent bcf916fe5a
commit e8a4e73cb6
@@ -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());
}
}