fix: mode@Test annotation to test level for comments and tags packages

This commit is contained in:
Cristina Axinte
2016-12-12 10:21:41 +02:00
parent 37699ac9fd
commit 41419677d4
20 changed files with 125 additions and 20 deletions
@@ -20,7 +20,6 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public class AddCommentCoreTests extends RestTest
{
private UserModel adminUserModel;
@@ -49,6 +48,7 @@ public class AddCommentCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION,
description = "Verify that invalid request returns status code 404 for nodeId that does not exist")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void addCommentUsingInvalidNodeId() throws JsonToModelConversionException, Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -62,6 +62,7 @@ public class AddCommentCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION,
description = "Verify that request using nodeId that is neither document or folder returns 405")
@Bug(id = "MNT-16904")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void addCommentUsingResourceThatIsNotFileOrFolder() throws JsonToModelConversionException, Exception
{
LinkModel link = dataLink.usingAdmin().usingSite(siteModel).createRandomLink();
@@ -76,6 +77,7 @@ public class AddCommentCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION,
description = "Verify that adding comment using empty content returns 400 status code")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void addCommentUsingEmptyContent() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel)
@@ -85,6 +87,7 @@ public class AddCommentCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION,
description = "Verify adding comment with the same content as one existing comment")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void addCommentTwice() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel)
@@ -100,6 +103,7 @@ public class AddCommentCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION,
description = "Verify that comment can be retrieved after it is added")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void addCommentThenRetrieveComment() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel)
@@ -115,6 +119,7 @@ public class AddCommentCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION,
description = "Verify comment cannot be added if user is not member of private site")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void addCommentWithNonMemberOfPrivateSite() throws JsonToModelConversionException, Exception
{
UserModel member = dataUser.createRandomTestUser();
@@ -129,6 +134,7 @@ public class AddCommentCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION,
description = "Verify comment cannot be added if empty network ID is provided")
@Bug(id = "MNT-16904")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void addCommentUsingEmptyNetworkId() throws JsonToModelConversionException, Exception
{
UserModel member = dataUser.createRandomTestUser();
@@ -141,6 +147,7 @@ public class AddCommentCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION,
description = "Verify that comment cannot be added to another comment")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void addCommentToAComment() throws JsonToModelConversionException, Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -156,6 +163,7 @@ public class AddCommentCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION,
description = "Verify that comment cannot be added to a tag")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void addCommentToATag() throws JsonToModelConversionException, Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -21,7 +21,6 @@ import org.testng.annotations.Test;
/**
* Created by Claudia Agache on 10/10/2016.
*/
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public class AddCommentsSanityTests extends RestTest
{
private UserModel adminUserModel;
@@ -50,6 +49,7 @@ public class AddCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify admin user adds multiple comments with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void adminIsAbleToAddComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel)
@@ -62,6 +62,7 @@ public class AddCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Manager user adds multiple comments with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void managerIsAbleToAddComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager))
@@ -74,6 +75,7 @@ public class AddCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user adds multiple comments with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void contributorIsAbleToAddComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
@@ -86,6 +88,7 @@ public class AddCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user adds multiple comments with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void collaboratorIsAbleToAddComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
@@ -99,6 +102,7 @@ public class AddCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Consumer user adds multiple comments with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void consumerIsAbleToAddComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
@@ -109,6 +113,7 @@ public class AddCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user gets status code 401 on post multiple comments call")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void unauthenticatedUserIsNotAbleToAddComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(new UserModel("random user", "random password"))
@@ -17,7 +17,6 @@ import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public class DeleteCommentsCoreTests extends RestTest
{
private UserModel adminUserModel;
@@ -51,6 +50,7 @@ public class DeleteCommentsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Manager user deletes comments created by admin and status code is 204")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void managerIsAbleToDeleteComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -62,6 +62,7 @@ public class DeleteCommentsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Admin user can't delete comments with inexistent ID and status code is 404")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void userIsNotAbleToDeleteInexistentComment() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -73,6 +74,7 @@ public class DeleteCommentsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Admin user can't delete comments with inexistend NodeId and status code is 404")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void userIsNotAbleToDeleteCommentWithInexistentNodeId() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -85,6 +87,7 @@ public class DeleteCommentsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Admin user can't delete deleted comments and status code is 404")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void userIsNotAbleToDeleteDeletedComment() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -14,7 +14,6 @@ import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public class DeleteCommentsSanityTests extends RestTest
{
private UserModel adminUserModel;
@@ -36,6 +35,7 @@ public class DeleteCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Admin user deletes comments with Rest API and status code is 204")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void adminIsAbleToDeleteComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -46,6 +46,7 @@ public class DeleteCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Manager user deletes own comments and status code is 204")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void managerIsAbleToDeleteComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
@@ -56,6 +57,7 @@ public class DeleteCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user deletes own comments and status code is 204")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void collaboratorIsAbleToDeleteComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator));
@@ -66,6 +68,7 @@ public class DeleteCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user deletes own comments and status code is 204")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void contributorIsAbleToDeleteComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor));
@@ -77,6 +80,7 @@ public class DeleteCommentsSanityTests extends RestTest
@Bug(id="MNT-16904")
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify User gets status code 401 if authentication call fails")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void userIsNotAbleToDeleteCommentIfAuthenticationFails() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -15,7 +15,6 @@ import org.testng.annotations.Test;
/**
* Created by Claudia Agache on 11/18/2016.
*/
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public class GetCommentsCoreTests extends RestTest
{
private UserModel adminUserModel, userModel, networkUserModel;
@@ -45,6 +44,7 @@ public class GetCommentsCoreTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.CORE, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify invalid request returns status code 400 for invalid maxItems or skipCount")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void checkStatusCodeForInvalidMaxItems() throws Exception
{
restClient.authenticateUser(adminUserModel).withParams("maxItems=0")
@@ -55,6 +55,7 @@ public class GetCommentsCoreTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.CORE, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify User can't get comments for node with ID that does not exist and status code is 404")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void userCanNotGetCommentsOnNonexistentFile() throws Exception
{
FileModel nonexistentFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
@@ -67,6 +68,7 @@ public class GetCommentsCoreTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.CORE, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify User can't get comments for node that exists but is not a document or a folder and status code is 400")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
@Bug(id = "MNT-16904")
public void userCanNotGetCommentsOnLink() throws Exception
{
@@ -81,6 +83,7 @@ public class GetCommentsCoreTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.CORE, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify request returns status 403 if the user does not have permission read comments on the node")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void uninvitedUserCanNotGetCommentsFromPrivateSite() throws Exception
{
restClient.authenticateUser(userModel).withCoreAPI()
@@ -91,6 +94,7 @@ public class GetCommentsCoreTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.CORE, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify user gets comments without the first 2 and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void skipFirst2Comments() throws Exception
{
comments = restClient.authenticateUser(adminUserModel).withParams("skipCount=2")
@@ -104,6 +108,7 @@ public class GetCommentsCoreTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.CORE, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify get comments from node with invalid network id returns status code 401")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void getCommentsWithInvalidNetwork() throws Exception
{
networkUserModel.setDomain("invalidNetwork");
@@ -113,6 +118,7 @@ public class GetCommentsCoreTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.CORE, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify get comments from node with empty network id returns status code 401")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void getCommentsWithEmptyNetwork() throws Exception
{
networkUserModel.setDomain("");
@@ -14,7 +14,6 @@ import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public class GetCommentsSanityTests extends RestTest
{
private UserModel adminUserModel;
@@ -40,6 +39,7 @@ public class GetCommentsSanityTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.SANITY}, executionType= ExecutionType.SANITY,
description= "Verify Admin user gets comments with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void adminIsAbleToRetrieveComments() throws JsonToModelConversionException, Exception
{
comments = restClient.authenticateUser(adminUserModel).withCoreAPI()
@@ -50,6 +50,7 @@ public class GetCommentsSanityTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.SANITY}, executionType= ExecutionType.SANITY,
description= "Verify Manager user gets comments created by admin user with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void managerIsAbleToRetrieveComments() throws JsonToModelConversionException, Exception
{
comments = restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)).withCoreAPI()
@@ -60,6 +61,7 @@ public class GetCommentsSanityTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.SANITY}, executionType= ExecutionType.SANITY,
description= "Verify Contributor user gets comments created by admin user with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void contributorIsAbleToRetrieveComments() throws JsonToModelConversionException, Exception
{
comments = restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)).withCoreAPI()
@@ -70,6 +72,7 @@ public class GetCommentsSanityTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.SANITY}, executionType= ExecutionType.SANITY,
description= "Verify Collaborator user gets comments created by admin user with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void collaboratorIsAbleToRetrieveComments() throws JsonToModelConversionException, Exception
{
comments = restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)).withCoreAPI()
@@ -80,6 +83,7 @@ public class GetCommentsSanityTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.SANITY}, executionType= ExecutionType.SANITY,
description= "Verify Consumer user gets comments created by admin user with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void consumerIsAbleToRetrieveComments() throws JsonToModelConversionException, Exception
{
comments = restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)).withCoreAPI()
@@ -90,6 +94,7 @@ public class GetCommentsSanityTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.SANITY}, executionType= ExecutionType.SANITY,
description= "Verify Manager user gets status code 401 if authentication call fails")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void managerIsNotAbleToRetrieveCommentIfAuthenticationFails() throws JsonToModelConversionException, Exception
{
UserModel nonexistentModel = new UserModel("nonexistentUser", "nonexistentPassword");
@@ -101,6 +106,7 @@ public class GetCommentsSanityTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.SANITY}, executionType= ExecutionType.SANITY,
description= "Verify Manager user gets comments created by another user and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void managerIsAbleToRetrieveCommentsCreatedByAnotherUser() throws JsonToModelConversionException, Exception
{
userModel = usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator);
@@ -117,6 +123,7 @@ public class GetCommentsSanityTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.SANITY}, executionType= ExecutionType.SANITY,
description= "Verify admin user gets comments created by another user and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void adminIsAbleToRetrieveCommentsCreatedByAnotherUser() throws JsonToModelConversionException, Exception
{
userModel = usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator);
@@ -15,7 +15,6 @@ import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public class UpdateCommentsSanityTests extends RestTest
{
private UserModel adminUserModel;
@@ -37,6 +36,7 @@ public class UpdateCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Admin user updates comments and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void adminIsAbleToUpdateHisComment() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -50,6 +50,7 @@ public class UpdateCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Manager user updates comments created by admin user and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void managerIsAbleToUpdateHisComment() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
@@ -63,6 +64,7 @@ public class UpdateCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user can update his own comment and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void contributorIsAbleToUpdateHisComment() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor));
@@ -74,6 +76,7 @@ public class UpdateCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Consumer user can not update comments created by admin user and status code is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void consumerIsNotAbleToUpdateComment() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -87,6 +90,7 @@ public class UpdateCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user can update his own comment and status code is 200")
@Bug(id="REPO-1011")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void collaboratorIsAbleToUpdateHisComment() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator));
@@ -98,6 +102,7 @@ public class UpdateCommentsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user gets status code 401 on update comment call")
@Bug(id="MNT-16904")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void unauthenticatedUserIsNotAbleToUpdateComment() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -109,6 +114,7 @@ public class UpdateCommentsSanityTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.SANITY }, executionType = ExecutionType.SANITY, description = "Verify update comment with inexistent nodeId returns status code 404")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void canNotUpdateCommentIfNodeIdIsNotSet() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -122,6 +128,7 @@ public class UpdateCommentsSanityTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.SANITY }, executionType = ExecutionType.SANITY, description = "Verify if commentId is not set the status code is 404")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void canNotUpdateCommentIfCommentIdIsNotSet() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -21,7 +21,6 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public class AddTagCoreTests extends RestTest
{
private UserModel adminUserModel;
@@ -53,6 +52,7 @@ public class AddTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that adding empty tag returns status code 400")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void emptyTagTest() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -62,6 +62,7 @@ public class AddTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that adding tag with user that has no permissions returns status code 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void addTagWithUserThatDoesNotHavePermissions() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(testUser);
@@ -71,6 +72,7 @@ public class AddTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that adding tag to a node that does not exist returns status code 404")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void addTagToInexistentNode() throws JsonToModelConversionException, Exception
{
FileModel document = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -85,6 +87,7 @@ public class AddTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that adding tag to a node that does not accepts tags returns status code 405")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void addTagToANodeThatDoesNotAcceptsTags() throws JsonToModelConversionException, Exception
{
FileModel document = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -98,6 +101,7 @@ public class AddTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that manager is able to tag a file")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void managerIsAbleToTagAFile() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
@@ -108,6 +112,7 @@ public class AddTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that manager is able to tag a folder")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void managerIsAbleToTagAFolder() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
@@ -118,6 +123,7 @@ public class AddTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that tagged file can be tagged again")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void addTagToATaggedFile() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -141,6 +147,7 @@ public class AddTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that user cannot add invalid tag")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void addInvalidTag() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -24,7 +24,6 @@ import org.testng.annotations.Test;
/**
* Created by Claudia Agache on 10/3/2016.
*/
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public class AddTagSanityTests extends RestTest
{
private UserModel adminUserModel, userModel;
@@ -52,6 +51,7 @@ public class AddTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify admin user adds tags with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void adminIsAbleToAddTag() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -63,6 +63,7 @@ public class AddTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Manager user adds tags with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void managerIsAbleToAddTag() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
@@ -74,6 +75,7 @@ public class AddTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user adds tags with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void collaboratorIsAbleToAddTag() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator));
@@ -85,6 +87,7 @@ public class AddTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user doesn't have permission to add tags with Rest API and status code is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void contributorIsNotAbleToAddTagToAnotherContent() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor));
@@ -94,6 +97,7 @@ public class AddTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user adds tags to his content with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void contributorIsAbleToAddTagToHisContent() throws JsonToModelConversionException, Exception
{
userModel = usersWithRoles.getOneUserWithRole(UserRole.SiteContributor);
@@ -107,6 +111,7 @@ public class AddTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Consumer user doesn't have permission to add tags with Rest API and status code is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void consumerIsNotAbleToAddTag() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer));
@@ -117,6 +122,7 @@ public class AddTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user gets status code 401 if authentication call fails")
@Bug(id="MNT-16904")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void userIsNotAbleToAddTagIfAuthenticationFails() throws JsonToModelConversionException, Exception
{
UserModel siteManager = usersWithRoles.getOneUserWithRole(UserRole.SiteManager);
@@ -24,7 +24,6 @@ import org.testng.annotations.Test;
/**
* Created by Claudia Agache on 10/7/2016.
*/
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public class AddTagsSanityTests extends RestTest
{
private UserModel adminUserModel, userModel;
@@ -53,6 +52,7 @@ public class AddTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify admin user adds multiple tags with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void adminIsAbleToAddTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -64,6 +64,7 @@ public class AddTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Manager user adds multiple tags with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void managerIsAbleToAddTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
@@ -75,6 +76,7 @@ public class AddTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user adds multiple tags with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void collaboratorIsAbleToAddTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator));
@@ -86,6 +88,7 @@ public class AddTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user doesn't have permission to add multiple tags with Rest API and status code is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void contributorIsNotAbleToAddTagsToAnotherContent() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor));
@@ -95,6 +98,7 @@ public class AddTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user adds multiple tags to his content with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void contributorIsAbleToAddTagsToHisContent() throws JsonToModelConversionException, Exception
{
userModel = usersWithRoles.getOneUserWithRole(UserRole.SiteContributor);
@@ -108,6 +112,7 @@ public class AddTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Consumer user doesn't have permission to add multiple tags with Rest API and status code is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void consumerIsNotAbleToAddTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)).withCoreAPI().usingResource(document).addTags(tag1, tag2);
@@ -117,6 +122,7 @@ public class AddTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user gets status code 401 if authentication call fails")
@Bug(id="MNT-16904")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void userIsNotAbleToAddTagsIfAuthenticationFails() throws JsonToModelConversionException, Exception
{
UserModel siteManager = usersWithRoles.getOneUserWithRole(UserRole.SiteManager);
@@ -18,7 +18,6 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public class DeleteTagCoreTests extends RestTest
{
private UserModel adminUserModel, userModel;
@@ -45,6 +44,7 @@ public class DeleteTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that if user has no permission to remove tag returned status code is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void deleteTagWithUserWithoutPermission() throws Exception
{
restClient.authenticateUser(userModel);
@@ -54,6 +54,7 @@ public class DeleteTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that if node does not exist returned status code is 404")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void deleteTagForAnInexistentNode() throws Exception
{
FileModel document = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -65,6 +66,7 @@ public class DeleteTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that if tag does not exist returned status code is 404")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void deleteTagThatDoesNotExist() throws Exception
{
tag.setId("abc");
@@ -74,6 +76,7 @@ public class DeleteTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that if tag id is empty returned status code is 405")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void deleteTagWithEmptyId() throws Exception
{
tag.setId("");
@@ -83,6 +86,7 @@ public class DeleteTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that file tag can be deleted")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void deleteFileTag() throws Exception
{
restClient.withCoreAPI().usingResource(document).deleteTag(tag);
@@ -93,6 +97,7 @@ public class DeleteTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that folder tag can be deleted")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void deleteFolderTag() throws Exception
{
tag = restClient.withCoreAPI().usingResource(folderModel).addTag(RandomData.getRandomName("tag"));
@@ -23,7 +23,6 @@ import org.testng.annotations.Test;
/**
* Created by Claudia Agache on 10/4/2016.
*/
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public class DeleteTagSanityTests extends RestTest
{
private UserModel adminUserModel, userModel;
@@ -43,6 +42,7 @@ public class DeleteTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Admin user deletes tags with Rest API and status code is 204")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void adminIsAbleToDeleteTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -54,6 +54,7 @@ public class DeleteTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Manager user deletes tags created by admin user with Rest API and status code is 204")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void managerIsAbleToDeleteTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -66,6 +67,7 @@ public class DeleteTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user deletes tags created by admin user with Rest API and status code is 204")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void collaboratorIsAbleToDeleteTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -78,6 +80,7 @@ public class DeleteTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS },
executionType = ExecutionType.SANITY, description = "Verify Contributor user can't delete tags created by admin user with Rest API and status code is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void contributorIsNotAbleToDeleteTagsForAnotherUserContent() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -90,6 +93,7 @@ public class DeleteTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user deletes tags created by him with Rest API and status code is 204")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void contributorIsAbleToDeleteTagsForHisContent() throws JsonToModelConversionException, Exception
{
userModel = usersWithRoles.getOneUserWithRole(UserRole.SiteContributor);
@@ -103,6 +107,7 @@ public class DeleteTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Consumer user can't delete tags created by admin user with Rest API and status code is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void consumerIsNotAbleToDeleteTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -116,6 +121,7 @@ public class DeleteTagSanityTests extends RestTest
@Bug(id="MNT-16904")
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user gets status code 401 if authentication call fails")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void userIsNotAbleToDeleteTagIfAuthenticationFails() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -17,7 +17,6 @@ import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public class GetNodeTagsCoreTests extends RestTest
{
private UserModel adminUserModel, userModel;
@@ -45,6 +44,7 @@ public class GetNodeTagsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that using invalid value for skipCount parameter returns status code 400")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void invalidSkipCountTest() throws JsonToModelConversionException, Exception
{
restClient.withParams("skipCount=abc").withCoreAPI().usingResource(document).getNodeTags();
@@ -56,6 +56,7 @@ public class GetNodeTagsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that using invalid value for maxItems parameter returns status code 400")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void invalidMaxItemsTest() throws JsonToModelConversionException, Exception
{
restClient.withParams("maxItems=abc").withCoreAPI().usingResource(document).getNodeTags();
@@ -67,6 +68,7 @@ public class GetNodeTagsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that user without permissions returns status code 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void userWithoutPermissionsTest() throws JsonToModelConversionException, Exception
{
SiteModel site = dataSite.usingUser(adminUserModel).createModeratedRandomSite();
@@ -80,6 +82,7 @@ public class GetNodeTagsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that if node does not exist returns status code 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void inexistentNodeTest() throws JsonToModelConversionException, Exception
{
FileModel document = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -92,6 +95,7 @@ public class GetNodeTagsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that if node id is empty returns status code 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void emptyNodeIdTest() throws JsonToModelConversionException, Exception
{
FileModel document = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -103,6 +107,7 @@ public class GetNodeTagsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify file tags")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void fileTagsTest() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel).withCoreAPI().usingResource(document).getNodeTags()
@@ -113,6 +118,7 @@ public class GetNodeTagsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify folder tags")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void folderTagsTest() throws JsonToModelConversionException, Exception
{
FolderModel folder = dataContent.usingUser(adminUserModel).usingSite(siteModel).createFolder();
@@ -15,7 +15,6 @@ import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public class GetNodeTagsSanityTests extends RestTest
{
private UserModel adminUserModel;
@@ -46,6 +45,7 @@ public class GetNodeTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS },
executionType = ExecutionType.SANITY, description = "Verify site Manager is able to get node tags")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void siteManagerIsAbleToRetrieveNodeTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
@@ -60,6 +60,7 @@ public class GetNodeTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS },
executionType = ExecutionType.SANITY, description = "Verify site Collaborator is able to get node tags")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void siteCollaboratorIsAbleToRetrieveNodeTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator));
@@ -73,6 +74,7 @@ public class GetNodeTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS },
executionType = ExecutionType.SANITY, description = "Verify site Contributor is able to get node tags")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void siteContributorIsAbleToRetrieveNodeTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor));
@@ -86,6 +88,7 @@ public class GetNodeTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS },
executionType = ExecutionType.SANITY, description = "Verify site Consumer is able to get node tags")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void siteConsumerIsAbleToRetrieveNodeTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer));
@@ -99,6 +102,7 @@ public class GetNodeTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS },
executionType = ExecutionType.SANITY, description = "Verify admin is able to get node tags")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void adminIsAbleToRetrieveNodeTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -111,6 +115,7 @@ public class GetNodeTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS },
executionType = ExecutionType.SANITY, description = "Verify unauthenticated user is not able to get node tags")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void unauthenticatedUserIsNotAbleToRetrieveNodeTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(new UserModel("random user", "random password"));
@@ -17,7 +17,6 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public class GetTagCoreTests extends RestTest
{
private UserModel adminUserModel;
@@ -43,6 +42,7 @@ public class GetTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that if tag id is invalid status code returned is 400")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void invalidTagIdTest() throws JsonToModelConversionException, Exception
{
tag.setId("random_tag_value");
@@ -52,6 +52,7 @@ public class GetTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Retrieve and validate the id of a tag added to a file")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void validateTagIdTest() throws JsonToModelConversionException, Exception
{
RestTagModel returnedTag = restClient.withCoreAPI().getTag(tag);
@@ -61,6 +62,7 @@ public class GetTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Retrieve and validate the name of a tag added to a file")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void validateTagNameTest() throws JsonToModelConversionException, Exception
{
RestTagModel returnedTag = restClient.withCoreAPI().getTag(tag);
@@ -19,7 +19,6 @@ import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public class GetTagSanityTests extends RestTest
{
private UserModel adminUserModel;
@@ -40,6 +39,7 @@ public class GetTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify admin user gets tag using REST API and status code is OK (200)")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void userWithAdminIsAbletoGetTag() throws JsonToModelConversionException, Exception
{
String tagValue = RandomData.getRandomName("tag");
@@ -53,6 +53,7 @@ public class GetTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role gets tag using REST API and status code is OK (200)")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void userWithManagerRoleIsAbletoGetTag() throws JsonToModelConversionException, Exception
{
String tagValue = RandomData.getRandomName("tag");
@@ -65,6 +66,7 @@ public class GetTagSanityTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role gets tag using REST API and status code is OK (200)")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void userWithCollaboratorRoleIsAbletoGetTag() throws JsonToModelConversionException, Exception
{
String tagValue = RandomData.getRandomName("tag");
@@ -77,6 +79,7 @@ public class GetTagSanityTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role gets tag using REST API and status code is OK (200)")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void userWithContributorRoleIsAbletoGetTag() throws JsonToModelConversionException, Exception
{
String tagValue = RandomData.getRandomName("tag");
@@ -91,6 +94,7 @@ public class GetTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role gets tag using REST API and status code is OK (200)")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void userWithConsumerRoleIsAbletoGetTag() throws JsonToModelConversionException, Exception
{
String tagValue = RandomData.getRandomName("tag");
@@ -105,6 +109,7 @@ public class GetTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails")
@Bug(id = "MNT-16904")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void managerIsNotAbleToGetTagIfAuthenticationFails() throws JsonToModelConversionException, Exception
{
String tagValue = RandomData.getRandomName("tag");
@@ -18,7 +18,6 @@ import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public class GetTagsCoreTests extends RestTest
{
private UserModel adminUserModel;
@@ -49,6 +48,7 @@ public class GetTagsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that if maxItems is invalid status code returned is 400")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void maxItemsInvalidValueTest() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel).withParams("maxItems=abc").withCoreAPI().getTags();
@@ -57,6 +57,7 @@ public class GetTagsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that if skipCount is invalid status code returned is 400")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void skipCountInvalidValueTest() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel).withParams("skipCount=abc").withCoreAPI().getTags();
@@ -65,6 +66,7 @@ public class GetTagsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that file tag is retrieved")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void fileTagIsRetrieved() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -76,6 +78,7 @@ public class GetTagsCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
description = "Verify that folder tag is retrieved")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void folderTagIsRetrieved() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -16,7 +16,6 @@ import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public class GetTagsSanityTests extends RestTest
{
private UserModel adminUserModel;
@@ -46,6 +45,7 @@ public class GetTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role gets tags using REST API and status code is OK (200)")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void getTagsWithManagerRole() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
@@ -57,6 +57,7 @@ public class GetTagsSanityTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role gets tags using REST API and status code is OK (200)")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void getTagsWithCollaboratorRole() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator));
@@ -68,6 +69,7 @@ public class GetTagsSanityTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role gets tags using REST API and status code is OK (200)")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void getTagsWithContributorRole() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor));
@@ -79,6 +81,7 @@ public class GetTagsSanityTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role gets tags using REST API and status code is OK (200)")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void getTagsWithConsumerRole() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer));
@@ -90,6 +93,7 @@ public class GetTagsSanityTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Admin user gets tags using REST API and status code is OK (200)")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void getTagsWithAdminUser() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -102,6 +106,7 @@ public class GetTagsSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Failed authentication get tags call returns status code 401 with Manager role")
@Bug(id = "MNT-16904")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void failedAuthenticationReturnsUnauthorizedStatus() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
@@ -23,7 +23,6 @@ import org.testng.annotations.Test;
/**
* Created by Bogdan Bocancea
*/
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public class UpdateTagCoreTests extends RestTest
{
private UserModel managerUser;
@@ -47,6 +46,7 @@ public class UpdateTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify site manager is not able to update tag with invalid id")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void managerIsNotAbleToUpdateTagWithInvalidId() throws JsonToModelConversionException, Exception
{
String invalidTagId = "invalid-id";
@@ -59,6 +59,7 @@ public class UpdateTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify site manager is not able to update tag with empty id")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void managerIsNotAbleToUpdateTagWithEmptyId() throws JsonToModelConversionException, Exception
{
RestTagModel tag = restClient.withCoreAPI().usingResource(document).addTag(RandomData.getRandomName("tag"));
@@ -70,6 +71,7 @@ public class UpdateTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify site manager is not able to update tag with invalid body")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void managerIsNotAbleToUpdateTagWithEmptyBody() throws JsonToModelConversionException, Exception
{
RestTagModel tag = restClient.withCoreAPI().usingResource(document).addTag(RandomData.getRandomName("tag"));
@@ -82,6 +84,7 @@ public class UpdateTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY,
description = "Verify site manager is not able to update tag with invalid body containing '|' symbol")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void managerIsNotAbleToUpdateTagWithInvalidBodyScenario1() throws JsonToModelConversionException, Exception
{
String invalidTagBody = "|.\"/<>*";
@@ -96,6 +99,7 @@ public class UpdateTagCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY,
description = "Verify site manager is not able to update tag with invalid body without '|' symbol")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.CORE })
public void managerIsNotAbleToUpdateTagWithInvalidBodyScenario2() throws JsonToModelConversionException, Exception
{
String invalidTagBody = ".\"/<>*";
@@ -23,7 +23,6 @@ import org.testng.annotations.Test;
/**
* Created by Claudia Agache on 10/4/2016.
*/
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public class UpdateTagSanityTests extends RestTest
{
private UserModel adminUserModel;
@@ -53,6 +52,7 @@ public class UpdateTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Admin user updates tags and status code is 200")
@Bug(id="MNT-16917")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void adminIsAbleToUpdateTags() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
@@ -63,6 +63,7 @@ public class UpdateTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Manager user can't update tags with Rest API and status code is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void managerIsNotAbleToUpdateTag() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
@@ -72,6 +73,7 @@ public class UpdateTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user can't update tags with Rest API and status code is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void collaboratorIsNotAbleToUpdateTag() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator));
@@ -81,6 +83,7 @@ public class UpdateTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user can't update tags with Rest API and status code is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void contributorIsNotAbleToUpdateTag() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor));
@@ -90,6 +93,7 @@ public class UpdateTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Consumer user can't update tags with Rest API and status code is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void consumerIsNotAbleToUpdateTag() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer));
@@ -100,6 +104,7 @@ public class UpdateTagSanityTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user gets status code 401 if authentication call fails")
@Bug(id="MNT-16904")
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
public void userIsNotAbleToUpdateTagIfAuthenticationFails() throws JsonToModelConversionException, Exception
{
UserModel siteManager = usersWithRoles.getOneUserWithRole(UserRole.SiteManager);