TAS-927 updateComment with Collaborator

This commit is contained in:
Cristina Jalba
2016-09-28 15:46:11 +03:00
parent c7091d7f2a
commit a65db3e70b

View File

@@ -85,6 +85,16 @@ public class UpdateCommentsSanityTest extends RestTest
commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN.toString());
}
@TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY,
description= "Verify Collaborator user updates comments created by admin user with Rest API and status code is 200")
public void collaboratorIsAbleToUpdateComment() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.get(UserRole.SiteCollaborator));
RestCommentModel commentEntry = commentsAPI.updateComment(document.getNodeRef(), commentModel.getId(), "This is the updated comment with Collaborator user");
commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN.toString());
commentEntry.assertCommentContentIs("This is the updated comment with Collaborator user");
}
@TestRail(section = { "rest-api",
"comments" }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails")
public void managerIsNotAbleToUpdateCommentIfAuthenticationFails() throws JsonToModelConversionException, Exception