REPO-2755 / REPO-2251: changed CORE and FULL groups with REGRESSION in comments package

This commit is contained in:
cagache
2017-10-06 11:59:04 +03:00
parent 7afbe20d0c
commit 65887702fe
5 changed files with 154 additions and 157 deletions
@@ -3,7 +3,6 @@ package org.alfresco.rest.comments;
import org.alfresco.dataprep.CMISUtil;
import org.alfresco.dataprep.CMISUtil.DocumentType;
import org.alfresco.rest.RestTest;
import org.alfresco.rest.exception.JsonToModelConversionException;
import org.alfresco.rest.model.RestCommentModel;
import org.alfresco.rest.model.RestCommentModelsCollection;
import org.alfresco.rest.model.RestErrorModel;
@@ -46,7 +45,7 @@ public class AddCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify admin user adds comments with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void adminIsAbleToAddComment() throws JsonToModelConversionException, Exception
public void adminIsAbleToAddComment() throws Exception
{
restClient.authenticateUser(adminUserModel);
String newContent = "This is a new comment added by " + adminUserModel.getUsername();
@@ -60,7 +59,7 @@ public class AddCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.SANITY,
description = "Verify that comment can be retrieved after it is added")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void addCommentThenRetrieveComment() throws JsonToModelConversionException, Exception
public void addCommentThenRetrieveComment() throws Exception
{
comment = RandomData.getRandomName("comment1");
restClient.authenticateUser(adminUserModel)
@@ -77,7 +76,7 @@ public class AddCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user gets status code 401 on post comments call")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
// @Bug(id = "MNT-16904", description = "It fails only on environment with tenants")
public void unauthenticatedUserIsNotAbleToAddComment() throws JsonToModelConversionException, Exception
public void unauthenticatedUserIsNotAbleToAddComment() throws Exception
{
restClient.authenticateUser(new UserModel("random user", "random password"));
restClient.withCoreAPI().usingResource(document).addComment("This is a new comment");
@@ -86,8 +85,8 @@ public class AddCommentTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Manager user adds comments with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void managerIsAbleToAddComment() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void managerIsAbleToAddComment() throws Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
String contentSiteManger = "This is a new comment added by user with role: " + UserRole.SiteManager;
@@ -99,9 +98,9 @@ public class AddCommentTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Contributor user adds comments with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
@Bug(id="ACE-4614")
public void contributorIsAbleToAddComment() throws JsonToModelConversionException, Exception
public void contributorIsAbleToAddComment() throws Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor));
String contentSiteContributor = "This is a new comment added by user with role" + UserRole.SiteContributor;
@@ -113,8 +112,8 @@ public class AddCommentTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Collaborator user adds comments with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void collaboratorIsAbleToAddComment() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void collaboratorIsAbleToAddComment() throws Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator));
String contentSiteCollaborator = "This is a new comment added by user with role: " + UserRole.SiteCollaborator;
@@ -125,8 +124,8 @@ public class AddCommentTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Consumer user can't add comments with Rest API and status code is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void consumerIsNotAbleToAddComment() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void consumerIsNotAbleToAddComment() throws Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer));
String contentSiteConsumer = "This is a new comment added by user with role: " + UserRole.SiteConsumer;
@@ -138,8 +137,8 @@ public class AddCommentTests 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
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentUsingInvalidNodeId() throws Exception
{
comment = RandomData.getRandomName("comment1");
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -153,8 +152,8 @@ public class AddCommentTests 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.FULL })
public void addCommentUsingResourceThatIsNotFileOrFolder() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentUsingResourceThatIsNotFileOrFolder() throws Exception
{
comment = RandomData.getRandomName("comment1");
LinkModel link = dataLink.usingAdmin().usingSite(siteModel).createRandomLink();
@@ -169,8 +168,8 @@ public class AddCommentTests 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.FULL })
public void addCommentUsingEmptyContent() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentUsingEmptyContent() throws Exception
{
restClient.authenticateUser(adminUserModel)
.withCoreAPI().usingResource(document).addComment("");
@@ -179,8 +178,8 @@ public class AddCommentTests 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.FULL })
public void addCommentTwice() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentTwice() throws Exception
{
comment = RandomData.getRandomName("comment1");
restClient.authenticateUser(adminUserModel)
@@ -196,8 +195,8 @@ public class AddCommentTests 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.FULL })
public void addCommentWithNonMemberOfPrivateSite() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentWithNonMemberOfPrivateSite() throws Exception
{
comment = RandomData.getRandomName("comment1");
UserModel member = dataUser.createRandomTestUser();
@@ -212,8 +211,8 @@ public class AddCommentTests 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", description = "It fails only on environment with tenants")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void addCommentUsingEmptyNetworkId() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentUsingEmptyNetworkId() throws Exception
{
comment = RandomData.getRandomName("comment1");
UserModel member = dataUser.createRandomTestUser();
@@ -227,8 +226,8 @@ public class AddCommentTests 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.FULL })
public void addCommentToAComment() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentToAComment() throws Exception
{
comment = RandomData.getRandomName("comment1");
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -244,8 +243,8 @@ public class AddCommentTests 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.FULL })
public void addCommentToATag() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentToATag() throws Exception
{
comment = RandomData.getRandomName("comment1");
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -87,7 +87,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Manager user adds multiple comments with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void managerIsAbleToAddComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager))
@@ -100,7 +100,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Contributor user adds multiple comments with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void contributorIsAbleToAddComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
@@ -113,7 +113,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Collaborator user adds multiple comments with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void collaboratorIsAbleToAddComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
@@ -127,7 +127,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Consumer user adds multiple comments with Rest API and status code is 201")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void consumerIsAbleToAddComments() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
@@ -138,7 +138,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify User can not add comments to a not joined private site. Status code returned is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void userCanNotAddCommentsToANotJoinedPrivateSite() throws Exception
{
SiteModel sitePrivateNotJoined = dataSite.createPrivateRandomSite();
@@ -151,7 +151,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify User can't add comments to a node with ID that does not exist and status code is 404")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void userCanNotAddCommentsOnNonexistentFile() throws Exception
{
FileModel nonexistentFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
@@ -164,7 +164,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify User can't add comments to a node that exists but is not a document or a folder and status code is 405")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
@Bug(id = "MNT-16904")
public void userCanNotAddCommentsOnLink() throws Exception
{
@@ -180,7 +180,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify User can add comments with the same content as one existing comment")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void userCanAddCommentWithTheSameContentAsExistingOne() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -204,7 +204,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify add comments from node with invalid network id returns status code 401")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentsWithInvalidNetworkId() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -216,7 +216,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify add comments from node with empty network id returns status code 401")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentsWithEmptyNetworkId() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -228,7 +228,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION,
description = "Verify that comments cannot be added to another comment")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentsToAComment() throws JsonToModelConversionException, Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -244,7 +244,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION,
description = "Verify that comments cannot be added to a tag")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentsToATag() throws JsonToModelConversionException, Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -260,7 +260,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Using Manager user verify that you can provide a large string for one comment")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addLongCommentsWithManagerAndCheckThatCommentIsReturned() throws Exception
{
document = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -281,7 +281,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Using Manager user verify that you can provide a short string for one comment")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addShortCommentsWithManagerAndCheckThatCommentIsReturned() throws Exception
{
document = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -302,7 +302,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Using Collaborator user verify that you can provide a string with special characters for one comment")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentsWithSpecialCharsWithCollaboratorCheckCommentIsReturned() throws Exception
{
document = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -323,7 +323,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Using Manager user verify that you can not provide an empty string for one comment")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addEmptyStringCommentsWithManagerCheckCommentIsReturned() throws Exception
{
document = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -337,7 +337,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Using Collaborator user verify that you can provide several comments in one request")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addSeveralCommentsWithCollaboratorCheckCommentsAreReturned() throws Exception
{
document = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -358,7 +358,7 @@ public class AddCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Provide invalid request body parameter and check default error model schema")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void invalidRequestBodyParameterCheckErrorModelSchema() throws Exception
{
document = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -44,7 +44,7 @@ public class DeleteCommentTests 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
public void adminIsAbleToDeleteComments() throws Exception
{
restClient.authenticateUser(adminUserModel);
commentModel = restClient.withCoreAPI().usingResource(document).addComment("This is a new comment");
@@ -55,7 +55,7 @@ public class DeleteCommentTests extends RestTest
@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 })
@Bug(id="MNT-16904", description = "It fails only on environment with tenants")
public void userIsNotAbleToDeleteCommentIfAuthenticationFails() throws JsonToModelConversionException, Exception
public void userIsNotAbleToDeleteCommentIfAuthenticationFails() throws Exception
{
restClient.authenticateUser(adminUserModel);
commentModel = restClient.withCoreAPI().usingResource(document).addComment("New comment addded by admin");
@@ -68,8 +68,8 @@ public class DeleteCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Manager user deletes own comments and status code is 204")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void managerIsAbleToDeleteComments() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void managerIsAbleToDeleteComments() throws Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
commentModel = restClient.withCoreAPI().usingResource(document).addComment("New comment added by Manager");
@@ -79,8 +79,8 @@ public class DeleteCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Collaborator user deletes own comments and status code is 204")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void collaboratorIsAbleToDeleteComments() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void collaboratorIsAbleToDeleteComments() throws Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator));
commentModel = restClient.withCoreAPI().usingResource(document).addComment("New comment added by Collaborator");
@@ -90,8 +90,8 @@ public class DeleteCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Contributor user deletes own comments and status code is 204")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void contributorIsAbleToDeleteComments() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void contributorIsAbleToDeleteComments() throws Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor));
commentModel = restClient.withCoreAPI().usingResource(document).addComment("New comment added by Contributor");
@@ -101,8 +101,8 @@ public class DeleteCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Consumer user can't delete comments created by admin user and status code is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void consumerIsNotAbleToDeleteComments() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void consumerIsNotAbleToDeleteComments() throws Exception
{
restClient.authenticateUser(adminUserModel);
commentModel = restClient.withCoreAPI().usingResource(document).addComment("This is a new comment");
@@ -114,8 +114,8 @@ public class DeleteCommentTests 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
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void userIsNotAbleToDeleteInexistentComment() throws Exception
{
restClient.authenticateUser(adminUserModel);
commentModel = new RestCommentModel();
@@ -126,8 +126,8 @@ public class DeleteCommentTests 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
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void userIsNotAbleToDeleteCommentWithInexistentNodeId() throws Exception
{
restClient.authenticateUser(adminUserModel);
commentModel = restClient.withCoreAPI().usingResource(document).addComment("This is a new comment");
@@ -139,8 +139,8 @@ public class DeleteCommentTests 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
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void userIsNotAbleToDeleteDeletedComment() throws Exception
{
restClient.authenticateUser(adminUserModel);
commentModel = restClient.withCoreAPI().usingResource(document).addComment("This is a new comment");
@@ -153,8 +153,8 @@ public class DeleteCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API,TestGroup.COMMENTS },
executionType = ExecutionType.REGRESSION, description = "Verify Manager user deletes comment created by admin"
+ " and status code is 204. Check with getComments for validation")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void managerIsAbleToDeleteCommentCreatedByOthers() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void managerIsAbleToDeleteCommentCreatedByOthers() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -174,8 +174,8 @@ public class DeleteCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API,TestGroup.COMMENTS },
executionType = ExecutionType.REGRESSION, description = "Verify Collaborator user can delete comment created by self"
+ " and status code is 204. Check with getComments for validation")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void collaboratorIsAbleToDeleteCommentCreatedBySelf() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void collaboratorIsAbleToDeleteCommentCreatedBySelf() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -194,9 +194,9 @@ public class DeleteCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API,TestGroup.COMMENTS },
executionType = ExecutionType.REGRESSION, description = "Verify Contributor user deletes comment created by self"
+ " and status code is 204. Check with getComments for validation")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
@Bug(id = "ACE-4614")
public void contributorIsAbleToDeleteCommentCreatedBySelf() throws JsonToModelConversionException, Exception
public void contributorIsAbleToDeleteCommentCreatedBySelf() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -215,8 +215,8 @@ public class DeleteCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API,TestGroup.COMMENTS },
executionType = ExecutionType.REGRESSION, description = "Verify Consumer user cannot delete comment created by admin"
+ " and status code is 403. Check with getComments for validation and check default error model schema.")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void consumerIsNotAbleToDeleteCommentCreatedByOthersDefaultErrorModelSchema() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void consumerIsNotAbleToDeleteCommentCreatedByOthersDefaultErrorModelSchema() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -238,8 +238,8 @@ public class DeleteCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API,TestGroup.COMMENTS },
executionType = ExecutionType.REGRESSION, description = "Verify Manager can delete comment with version number")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void usingManagerDeleteCommentWithVersionNumber() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void usingManagerDeleteCommentWithVersionNumber() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
dataContent.usingAdmin().usingResource(file).updateContent("updated content to increase version number");
@@ -253,8 +253,8 @@ public class DeleteCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API,TestGroup.COMMENTS },
executionType = ExecutionType.REGRESSION, description = "Verify Manager user cannot delete comment with invalid node "
+ "and status code is 404. Check with getComments for validation")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void usingManagerDeleteCommentWithInvalidNode() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void usingManagerDeleteCommentWithInvalidNode() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -270,7 +270,7 @@ public class DeleteCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS}, executionType = ExecutionType.REGRESSION,
description = "Verify deleteComment from node with invalid network id returns status code 401")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void deleteCommentWithInvalidNetworkId() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -283,8 +283,8 @@ public class DeleteCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API,TestGroup.COMMENTS },
executionType = ExecutionType.REGRESSION, description = "Verify deleteComment from node with empty network id returns status code 401")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void deleteCommentWithEmptyNetworkId() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void deleteCommentWithEmptyNetworkId() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -1,9 +1,7 @@
package org.alfresco.rest.comments;
import org.alfresco.dataprep.CMISUtil;
import org.alfresco.dataprep.CMISUtil.DocumentType;
import org.alfresco.rest.RestTest;
import org.alfresco.rest.exception.JsonToModelConversionException;
import org.alfresco.rest.model.RestCommentModelsCollection;
import org.alfresco.rest.model.RestErrorModel;
import org.alfresco.utility.constants.UserRole;
@@ -55,7 +53,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, 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
public void adminIsAbleToRetrieveComments() throws Exception
{
comments = restClient.authenticateUser(adminUserModel).withCoreAPI()
.usingResource(document1).getNodeComments();
@@ -67,7 +65,7 @@ public class GetCommentsTests extends RestTest
description= "Verify Manager user gets status code 401 if authentication call fails")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
@Bug(id="MNT-16904", description = "It fails only on environment with tenants")
public void managerIsNotAbleToRetrieveCommentIfAuthenticationFails() throws JsonToModelConversionException, Exception
public void managerIsNotAbleToRetrieveCommentIfAuthenticationFails() throws Exception
{
UserModel nonexistentModel = new UserModel("nonexistentUser", "nonexistentPassword");
restClient.authenticateUser(nonexistentModel).withCoreAPI()
@@ -78,8 +76,8 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
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.CORE })
public void managerIsAbleToRetrieveComments() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void managerIsAbleToRetrieveComments() throws Exception
{
comments = restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)).withCoreAPI()
.usingResource(document1).getNodeComments();
@@ -89,8 +87,8 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
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.CORE })
public void contributorIsAbleToRetrieveComments() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void contributorIsAbleToRetrieveComments() throws Exception
{
comments = restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)).withCoreAPI()
.usingResource(document1).getNodeComments();
@@ -100,8 +98,8 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
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.CORE })
public void collaboratorIsAbleToRetrieveComments() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void collaboratorIsAbleToRetrieveComments() throws Exception
{
comments = restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)).withCoreAPI()
.usingResource(document1).getNodeComments();
@@ -111,8 +109,8 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
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.CORE })
public void consumerIsAbleToRetrieveComments() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void consumerIsAbleToRetrieveComments() throws Exception
{
comments = restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)).withCoreAPI()
.usingResource(document1).getNodeComments();
@@ -123,8 +121,8 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify Manager user gets comments created by another user and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void managerIsAbleToRetrieveCommentsCreatedByAnotherUser() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void managerIsAbleToRetrieveCommentsCreatedByAnotherUser() throws Exception
{
userModel = usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator);
String contentManager = "This is a new comment added by " + userModel.getUsername();
@@ -140,8 +138,8 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify admin user gets comments created by another user and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void adminIsAbleToRetrieveCommentsCreatedByAnotherUser() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void adminIsAbleToRetrieveCommentsCreatedByAnotherUser() throws Exception
{
userModel = usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator);
String contentCollaborator = "This is a new comment added by " + userModel.getUsername();
@@ -157,7 +155,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, 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 })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void uninvitedUserCanNotGetCommentsFromPrivateSite() throws Exception
{
restClient.authenticateUser(userModel).withCoreAPI()
@@ -168,7 +166,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, 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 })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void skipFirst2Comments() throws Exception
{
comments = restClient.authenticateUser(adminUserModel).withParams("skipCount=2")
@@ -182,7 +180,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, 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.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void checkStatusCodeForInvalidMaxItems() throws Exception
{
restClient.authenticateUser(adminUserModel).withParams("maxItems=0")
@@ -193,7 +191,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, 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.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void userCanNotGetCommentsOnNonExistentFile() throws Exception
{
FileModel nonexistentFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
@@ -206,7 +204,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, 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.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void userCanNotGetCommentsOnLink() throws Exception
{
LinkModel link = dataLink.usingAdmin().usingSite(siteModel).createRandomLink();
@@ -224,7 +222,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, 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.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void getCommentsWithInvalidNetwork() throws Exception
{
networkUserModel.setDomain("invalidNetwork");
@@ -234,7 +232,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, 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.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void getCommentsWithEmptyNetwork() throws Exception
{
networkUserModel.setDomain("");
@@ -244,7 +242,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify that if manager adds one comment, it will be returned in getComments response")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentWithManagerAndCheckThatCommentIsReturned() throws Exception
{
file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -260,7 +258,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify that if collaborator adds one comment, it will be returned in getComments response")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentWithCollaboratorAndCheckThatCommentIsReturned() throws Exception
{
file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -277,7 +275,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify that if contributor adds one comment, it will be returned in getComments response")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
@Bug(id = "ACE-4614")
public void addCommentWithContributorAndCheckThatCommentIsReturned() throws Exception
{
@@ -295,7 +293,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify that consumer cannot add a comment and no comments will be returned in getComments response")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentWithConsumerAndCheckThatCommentIsNotReturned() throws Exception
{
file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -311,7 +309,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Add one comment with Manager and check that returned person is the right one")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentWithManagerCheckReturnedPersonIsTheRightOne() throws Exception
{
file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -326,7 +324,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Add one comment with Collaborator and check that returned company details are correct")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addCommentWithCollaboratorCheckReturnedCompanyDetails() throws Exception
{
file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -347,7 +345,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Add 2 comments with Manager and Collaborator users and verify valid request using skipCount. Check that param is applied")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addTwoCommentsWithManagerCollaboratorVerifySkipCountParamIsApplied() throws Exception
{
file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -365,7 +363,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Add 2 comments with Admin and Collaborator users and verify valid request using maxItems. Check that param is applied")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addTwoCommentsWithAdminCollaboratorVerifyMaxItemsParamIsApplied() throws Exception
{
file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -382,7 +380,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Add 2 comments with Manager and Admin users and verify valid request using properties. Check that param is applied")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addTwoCommentsWithAdminManagerVerifyPropertiesParamIsApplied() throws Exception
{
file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -406,7 +404,7 @@ public class GetCommentsTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Check default error model schema")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void addTwoCommentsWithManagerCheckDefaultErrorModelSchema() throws Exception
{
file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -49,7 +49,7 @@ public class UpdateCommentTests 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
public void adminIsAbleToUpdateHisComment() throws Exception
{
restClient.authenticateUser(adminUserModel);
commentModel = restClient.withCoreAPI().usingResource(document).addComment("This is a new comment added by admin");
@@ -63,7 +63,7 @@ public class UpdateCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user gets status code 401 on update comment call")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
@Bug(id = "MNT-16904", description = "fails only on environment with tenants")
public void unauthenticatedUserIsNotAbleToUpdateComment() throws JsonToModelConversionException, Exception
public void unauthenticatedUserIsNotAbleToUpdateComment() throws Exception
{
restClient.authenticateUser(adminUserModel);
commentModel = restClient.withCoreAPI().usingResource(document).addComment("To be updated by unauthenticated user.");
@@ -76,7 +76,7 @@ public class UpdateCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify entry content in response")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY })
public void checkEntryContentInResponse() throws JsonToModelConversionException, Exception
public void checkEntryContentInResponse() throws Exception
{
restClient.authenticateUser(adminUserModel);
commentModel = restClient.withCoreAPI().usingResource(document).addComment("This is a new comment added by admin");
@@ -86,8 +86,8 @@ public class UpdateCommentTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Manager user updates comments created by admin user and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void managerIsAbleToUpdateHisComment() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void managerIsAbleToUpdateHisComment() throws Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
commentModel = restClient.withCoreAPI().usingResource(document).addComment("This is a new comment added by manager");
@@ -99,8 +99,8 @@ public class UpdateCommentTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Contributor user can update his own comment and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void contributorIsAbleToUpdateHisComment() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void contributorIsAbleToUpdateHisComment() throws Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor));
commentModel = restClient.withCoreAPI().usingResource(document).addComment("This is a new comment added by contributor");
@@ -110,8 +110,8 @@ public class UpdateCommentTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, 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.CORE })
public void consumerIsNotAbleToUpdateComment() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void consumerIsNotAbleToUpdateComment() throws Exception
{
restClient.authenticateUser(adminUserModel);
commentModel = restClient.withCoreAPI().usingResource(document).addComment("This is a new comment added by admin");
@@ -123,8 +123,8 @@ public class UpdateCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, 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.CORE })
public void collaboratorIsAbleToUpdateHisComment() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void collaboratorIsAbleToUpdateHisComment() throws Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator));
commentModel = restClient.withCoreAPI().usingResource(document).addComment("This is a new comment added by collaborator");
@@ -134,8 +134,8 @@ public class UpdateCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Collaborator user can not update comments of another user and status code is 200")
// @Bug(id="MNT-2502",description="seems it's one old issue: also logged as MNT-2502, MNT-2346")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.CORE })
public void collaboratorIsNotAbleToUpdateCommentOfAnotherUser() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void collaboratorIsNotAbleToUpdateCommentOfAnotherUser() throws Exception
{
restClient.authenticateUser(adminUserModel);
commentModel = restClient.withCoreAPI().usingResource(document).addComment("This is a new comment added by admin");
@@ -145,8 +145,8 @@ public class UpdateCommentTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify update comment with inexistent nodeId returns status code 404")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void canNotUpdateCommentIfNodeIdIsNotSet() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void canNotUpdateCommentIfNodeIdIsNotSet() throws Exception
{
restClient.authenticateUser(adminUserModel);
@@ -159,8 +159,8 @@ public class UpdateCommentTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify if commentId is not set the status code is 404")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void canNotUpdateCommentIfCommentIdIsNotSet() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void canNotUpdateCommentIfCommentIdIsNotSet() throws Exception
{
restClient.authenticateUser(adminUserModel);
@@ -173,8 +173,8 @@ public class UpdateCommentTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify can not update comment if NodeId is neither document or folder and returns status code 405")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void canNotUpdateCommentIfNodeIdIsNeitherDocumentOrFolder() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void canNotUpdateCommentIfNodeIdIsNeitherDocumentOrFolder() throws Exception
{
FileModel content = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
content = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -195,8 +195,8 @@ public class UpdateCommentTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify Admin user is not able to update with empty comment body and status code is 400")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void adminIsNotAbleToUpdateWithEmptyCommentBody() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void adminIsNotAbleToUpdateWithEmptyCommentBody() throws Exception
{
restClient.authenticateUser(adminUserModel);
commentModel = restClient.withCoreAPI().usingResource(document).addComment("This is a new comment added by admin");
@@ -207,8 +207,8 @@ public class UpdateCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify updated comment by Manager is listed when calling getComments and status code is 200")
// @Bug(id="REPO-1011")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void updatedCommentByManagerIsListed() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void updatedCommentByManagerIsListed() throws Exception
{
commentModel = restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
.withCoreAPI().usingResource(document).addComment("This is a new comment added by collaborator");
@@ -221,8 +221,8 @@ public class UpdateCommentTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify Manager user can update a comment with a large string")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void managerIsAbleToUpdateACommentWithALargeString() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void managerIsAbleToUpdateACommentWithALargeString() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
String longString = RandomStringUtils.randomAlphanumeric(10000);
@@ -239,8 +239,8 @@ public class UpdateCommentTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify Manager user can update a comment with a short string")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void managerIsAbleToUpdateACommentWithAShortString() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void managerIsAbleToUpdateACommentWithAShortString() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
String shortString = RandomStringUtils.randomAlphanumeric(2);
@@ -257,8 +257,8 @@ public class UpdateCommentTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify Collaborator user can update a comment with special characters")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void collaboratorIsAbleToUpdateACommentThatContainsSpecialChars() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void collaboratorIsAbleToUpdateACommentThatContainsSpecialChars() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
String specialChars = "!@#$%^&*()'\".,<>-_+=|\\";
@@ -275,8 +275,8 @@ public class UpdateCommentTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Check that you cannot update comment with Consumer then call getComments and check new comment is not listed")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void cannotUpdateCommentWithConsumerCallGetComments() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void cannotUpdateCommentWithConsumerCallGetComments() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -296,9 +296,9 @@ public class UpdateCommentTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Update comment with Contributor then call getComments and check new comment is listed")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
@Bug(id = "ACE-4614")
public void updateCommentWithContributorCallGetComments() throws JsonToModelConversionException, Exception
public void updateCommentWithContributorCallGetComments() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -318,8 +318,8 @@ public class UpdateCommentTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Update comment with Collaborator then call getComments and check new comment is listed")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void updateCommentWithCollaboratorCallGetComments() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void updateCommentWithCollaboratorCallGetComments() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -339,8 +339,8 @@ public class UpdateCommentTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Update comment with Manager then check modified by information in response")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void updateCommentWithManagerCheckModifiedBy() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void updateCommentWithManagerCheckModifiedBy() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
UserModel manager = usersWithRoles.getOneUserWithRole(UserRole.SiteManager);
@@ -357,8 +357,8 @@ public class UpdateCommentTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Delete comment with Admin then try to update it")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void deleteCommentThenTryToUpdateIt() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void deleteCommentThenTryToUpdateIt() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -375,8 +375,8 @@ public class UpdateCommentTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify Manager user can update a comment with multi byte content")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void managerIsAbleToUpdateACommentWithMultiByteContent() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void managerIsAbleToUpdateACommentWithMultiByteContent() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
String multiByte = "\ufeff\u6768\u6728\u91d1";
@@ -393,8 +393,8 @@ public class UpdateCommentTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify Admin user can update a comment with properties parameter")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void adminIsAbleToUpdateACommentWithPropertiesParameter() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void adminIsAbleToUpdateACommentWithPropertiesParameter() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -413,8 +413,8 @@ public class UpdateCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION,
description = "Update comment with invalid node")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
public void updateCommentUsingInvalidNodeId() throws JsonToModelConversionException, Exception
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void updateCommentUsingInvalidNodeId() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
@@ -429,7 +429,7 @@ public class UpdateCommentTests extends RestTest
@TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.REGRESSION,
description= "Verify update comment from node with invalid network id returns status code 401")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void updateCommentWithInvalidNetworkId() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN);
@@ -442,7 +442,7 @@ public class UpdateCommentTests extends RestTest
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.REGRESSION, description = "Verify User can not update comment to a not joined private site. Status code returned is 403")
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.REGRESSION })
public void userCanNotUpdateCommentToANotJoinedPrivateSiteDefaultErrorModelSchema() throws Exception
{
UserModel newUser = dataUser.createRandomTestUser();