REPO-2755 : REST API & CMIS TAS sanity builds

Change testgroup from CORE to REGRESSION for sharedLinks, people and audit.
This commit is contained in:
Alexandru-Eusebiu Epure
2017-10-09 11:27:33 +03:00
parent c3877ae98b
commit ee1362daf3
20 changed files with 175 additions and 377 deletions
@@ -1,5 +1,8 @@
package org.alfresco.rest.people;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
import java.io.File;
import org.alfresco.rest.RestTest;
@@ -15,8 +18,6 @@ import org.testng.annotations.Test;
import com.jayway.restassured.response.ValidatableResponse;
import junit.framework.Assert;
public class AvatarPeopleSanityTest extends RestTest
{
@@ -38,8 +39,8 @@ public class AvatarPeopleSanityTest extends RestTest
.uploadAvatarContent(restProperties.envProperty().getFullServerUrl(), avatarFile).statusCode(200);
restClient.authenticateUser(userModel).withCoreAPI().usingAuthUser().downloadAvatarContent();
restClient.assertStatusCodeIs(HttpStatus.OK);
Assert.assertNotNull(response.extract().body().asByteArray());
Assert.assertTrue("Avatar Image not uploaded", response.extract().body().asByteArray().length > 0);
assertNotNull(response.extract().body().asByteArray());
assertTrue(response.extract().body().asByteArray().length > 0, "Avatar Image not uploaded");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.SANITY })
@@ -37,7 +37,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
privateSiteModel = dataSite.usingUser(adminUserModel).createPrivateRandomSite();
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user removes a site member using '-me-' in place of personId and response is successful (204)")
public void removeSiteMemberWithSuccessUsingMeAsPersonId() throws Exception
{
@@ -47,22 +47,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user can't remove a site membership if doesn't have access to personId and response is 422")
public void notAbleToRemoveSiteMemberWithNoAccessToPersonId() throws Exception
{
UserModel user = dataUser.createRandomTestUser();
dataSite.usingUser(user).createPublicRandomSite();
userModel.setUserRole(UserRole.SiteCollaborator);
restClient.authenticateUser(adminUserModel).withCoreAPI().usingSite(publicSiteModel).addPerson(userModel);
restClient.authenticateUser(user).withCoreAPI().usingUser(userModel).deleteSiteMember(publicSiteModel);
restClient.assertStatusCodeIs(HttpStatus.UNPROCESSABLE_ENTITY).assertLastError()
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, publicSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user can't remove a site membership of an inexistent uer and response is 404")
public void userIsNotAbleToRemoveInexistentSiteMember() throws Exception
{
@@ -72,7 +57,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
.containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, inexistentUser.getUsername()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user is not able to remove a member of an inexistent site and response is 404")
public void userIsNotAbleToRemoveMembershipOfInexistentSite() throws Exception
{
@@ -82,7 +67,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
.containsSummary(String.format(RestErrorModel.RELATIONSHIP_NOT_FOUND, userModel.getUsername(), inexistentSite.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user is not able to remove a member of an empty site id and response is 404")
public void userIsNotAbleToRemoveMembershipOfEmptySiteId() throws Exception
{
@@ -91,18 +76,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.METHOD_NOT_ALLOWED).assertLastError().containsSummary(RestErrorModel.DELETE_EMPTY_ARGUMENT);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user is not able to remove a regular member of a public site and response is 422")
public void regularUserIsNotAbleToRemoveRegularUserSiteMembershipFromPublicSite() throws Exception
{
restClient.authenticateUser(adminUserModel).withCoreAPI().usingSite(publicSiteModel).addPerson(secondUserModel);
restClient.authenticateUser(adminUserModel).withCoreAPI().usingSite(publicSiteModel).addPerson(userModel);
restClient.authenticateUser(secondUserModel).withCoreAPI().usingUser(userModel).deleteSiteMember(publicSiteModel);
restClient.assertStatusCodeIs(HttpStatus.UNPROCESSABLE_ENTITY).assertLastError()
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, publicSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user is not able to remove a regular member a moderated site and response is 422")
public void regularUserIsNotAbleToRemoveRegularUserSiteMembershipFromModeratedSite() throws Exception
{
@@ -113,7 +87,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, moderatedSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user is not able to remove a regular member of a private site and response is 422")
public void regularUserIsNotAbleToRemoveRegularUserSiteMembershipFromPrivateSite() throws Exception
{
@@ -124,16 +98,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, privateSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove a regular member of a public site and response is 204")
public void adminIsAbleToRemoveRegularUserSiteMembershipFromPublicSite() throws Exception
{
restClient.authenticateUser(adminUserModel).withCoreAPI().usingSite(publicSiteModel).addPerson(userModel);
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(userModel).deleteSiteMember(publicSiteModel);
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove a regular member of a moderated site and response is 204")
public void adminIsAbleToRemoveRegularUserSiteMembershipFromModeratedSite() throws Exception
{
@@ -142,7 +107,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove a regular member of a private site and response is 204")
public void adminIsAbleToRemoveRegularUserSiteMembershipFromPrivateSite() throws Exception
{
@@ -151,7 +116,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user is not able to remove admin membership from public site and response is 422")
public void regularUserIsNotAbleToRemoveAdminSiteMembershipFromPublicSite() throws Exception
{
@@ -162,7 +127,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, publicSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user is not able to remove admin membership from moderated site and response is 422")
public void regularUserIsNotAbleToRemoveAdminSiteMembershipFromModeratedSite() throws Exception
{
@@ -173,7 +138,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, moderatedSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user is not able to remove admin membership from private site and response is 422")
public void regularUserIsNotAbleToRemoveAdminSiteMembershipFromPrivateSite() throws Exception
{
@@ -184,7 +149,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, privateSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove the membership of a manager from a public site and response is 204")
public void adminIsAbleToRemoveManagerSiteMembershipOfPublicSite() throws Exception
{
@@ -196,7 +161,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove the membership of a manager from a moderated site and response is 204")
public void adminIsAbleToRemoveManagerSiteMembershipOfModeratedSite() throws Exception
{
@@ -208,7 +173,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove the membership of a manager from a private site and response is 204")
public void adminIsAbleToRemoveManagerSiteMembershipOfPrivateSite() throws Exception
{
@@ -220,7 +185,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify collaborator is not able to remove the membership of a manager from a public site and response is 204")
public void userIsNotAbleToRemoveManagerSiteMembershipOfPublicSite() throws Exception
{
@@ -234,7 +199,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, publicSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify collaborator is not able to remove the membership of a manager from a moderated site and response is 204")
public void userIsNotAbleToRemoveManagerSiteMembershipOfModeratedSite() throws Exception
{
@@ -248,7 +213,7 @@ public class DeleteSiteMemberCoreTests extends RestTest
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, moderatedSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify collaborator is not able to remove the membership of a manager from a private site and response is 204")
public void userIsNotAbleToRemoveManagerSiteMembershipOfPrivateSite() throws Exception
{
@@ -41,7 +41,7 @@ public class DeleteSiteMemberFullTests extends RestTest
UserRole.SiteContributor);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove collaborator member of a public site")
public void adminIsAbleToRemoveCollaboratorSiteMembershipFromPublicSite() throws Exception
{
@@ -49,8 +49,8 @@ public class DeleteSiteMemberFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
restClient.authenticateUser(adminUserModel).withCoreAPI().usingSite(publicSiteModel).addPerson(usersWithRolesPublicSite.getOneUserWithRole(UserRole.SiteCollaborator));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove contributor member of a public site")
public void adminIsAbleToRemoveContributorSiteMembershipFromPublicSite() throws Exception
{
@@ -58,17 +58,8 @@ public class DeleteSiteMemberFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
restClient.authenticateUser(adminUserModel).withCoreAPI().usingSite(publicSiteModel).addPerson(usersWithRolesPublicSite.getOneUserWithRole(UserRole.SiteContributor));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove consumer member of a public site")
public void adminIsAbleToRemoveConsumerSiteMembershipFromPublicSite() throws Exception
{
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(usersWithRolesPublicSite.getOneUserWithRole(UserRole.SiteConsumer)).deleteSiteMember(publicSiteModel);
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
restClient.authenticateUser(adminUserModel).withCoreAPI().usingSite(publicSiteModel).addPerson(usersWithRolesPublicSite.getOneUserWithRole(UserRole.SiteConsumer));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user is not able to remove contributor member of a public site and response is 422")
public void userIsNotAbleToRemoveContributorSiteMembershipFromPublicSite() throws Exception
{
@@ -76,8 +67,8 @@ public class DeleteSiteMemberFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.UNPROCESSABLE_ENTITY).assertLastError()
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, publicSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user is not able to remove consumer member of a public site and response is 422")
public void userIsNotAbleToRemoveConsumerSiteMembershipFromPublicSite() throws Exception
{
@@ -85,8 +76,8 @@ public class DeleteSiteMemberFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.UNPROCESSABLE_ENTITY).assertLastError()
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, publicSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove collaborator member of a moderated site")
public void adminIsAbleToRemoveCollaboratorSiteMembershipFromModeratedSite() throws Exception
{
@@ -94,8 +85,8 @@ public class DeleteSiteMemberFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
restClient.authenticateUser(adminUserModel).withCoreAPI().usingSite(moderatedSiteModel).addPerson(usersWithRolesModeratedSite.getOneUserWithRole(UserRole.SiteCollaborator));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove contributor member of a moderated site")
public void adminIsAbleToRemoveContributorSiteMembershipFromModeratedSite() throws Exception
{
@@ -103,17 +94,8 @@ public class DeleteSiteMemberFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
restClient.authenticateUser(adminUserModel).withCoreAPI().usingSite(moderatedSiteModel).addPerson(usersWithRolesModeratedSite.getOneUserWithRole(UserRole.SiteContributor));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove consumer member of a moderated site")
public void adminIsAbleToRemoveConsumerSiteMembershipFromModeratedSite() throws Exception
{
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(usersWithRolesModeratedSite.getOneUserWithRole(UserRole.SiteConsumer)).deleteSiteMember(moderatedSiteModel);
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
restClient.authenticateUser(adminUserModel).withCoreAPI().usingSite(moderatedSiteModel).addPerson(usersWithRolesModeratedSite.getOneUserWithRole(UserRole.SiteConsumer));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user is not able to remove contributor member of a moderated site and response is 422")
public void userIsNotAbleToRemoveContributorSiteMembershipFromModeratedSite() throws Exception
{
@@ -121,8 +103,8 @@ public class DeleteSiteMemberFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.UNPROCESSABLE_ENTITY).assertLastError()
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, moderatedSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user is not able to remove consumer member of a moderated site and response is 422")
public void userIsNotAbleToRemoveConsumerSiteMembershipFromModeratedSite() throws Exception
{
@@ -130,8 +112,8 @@ public class DeleteSiteMemberFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.UNPROCESSABLE_ENTITY).assertLastError()
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, moderatedSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove collaborator member of a private site")
public void adminIsAbleToRemoveCollaboratorSiteMembershipFromPrivateSite() throws Exception
{
@@ -139,8 +121,8 @@ public class DeleteSiteMemberFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
restClient.authenticateUser(adminUserModel).withCoreAPI().usingSite(privateSiteModel).addPerson(usersWithRolesPrivateSite.getOneUserWithRole(UserRole.SiteCollaborator));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove contributor member of a private site")
public void adminIsAbleToRemoveContributorSiteMembershipFromPrivateSite() throws Exception
{
@@ -148,17 +130,8 @@ public class DeleteSiteMemberFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
restClient.authenticateUser(adminUserModel).withCoreAPI().usingSite(privateSiteModel).addPerson(usersWithRolesPrivateSite.getOneUserWithRole(UserRole.SiteContributor));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is able to remove consumer member of a private site")
public void adminIsAbleToRemoveConsumerSiteMembershipFromPrivateSite() throws Exception
{
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(usersWithRolesPrivateSite.getOneUserWithRole(UserRole.SiteConsumer)).deleteSiteMember(privateSiteModel);
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
restClient.authenticateUser(adminUserModel).withCoreAPI().usingSite(privateSiteModel).addPerson(usersWithRolesPrivateSite.getOneUserWithRole(UserRole.SiteConsumer));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user is not able to remove contributor member of a private site and response is 422")
public void userIsNotAbleToRemoveContributorSiteMembershipFromPrivateSite() throws Exception
{
@@ -167,7 +140,7 @@ public class DeleteSiteMemberFullTests extends RestTest
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, privateSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user is not able to remove consumer member of a private site and response is 422")
public void userIsNotAbleToRemoveConsumerSiteMembershipFromPrivateSite() throws Exception
{
@@ -176,7 +149,7 @@ public class DeleteSiteMemberFullTests extends RestTest
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, privateSiteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is not able to remove same user twice and response is 400")
@Bug(id="ACE-5447")
public void adminIsNotAbleToRemoveSameUserTwice() throws Exception
@@ -191,7 +164,7 @@ public class DeleteSiteMemberFullTests extends RestTest
.assertSiteMemberHasRole(UserRole.SiteCollaborator);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify single manager is not able to delete himself and response is 400")
public void lastManagerIsNotAbleToDeleteHimself() throws Exception
{
@@ -209,7 +182,7 @@ public class DeleteSiteMemberFullTests extends RestTest
.assertThat().entriesListContains("id", usersWithRolesPublicSite.getOneUserWithRole(UserRole.SiteManager).getUsername());
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify site creator can be deleted")
public void siteCreatorCanBeDeleted() throws Exception
{
@@ -219,7 +192,7 @@ public class DeleteSiteMemberFullTests extends RestTest
restClient.withCoreAPI().usingSite(publicSiteModel).getSiteMembers().assertThat().entriesListContains("id", adminUserModel.getUsername());
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify admin is not able to remove from site a user that created a member request that was not accepted yet")
@Bug(id="ACE-5447")
public void adminIsNotAbleToRemoveFromSiteANonExistingMember() throws Exception
@@ -69,8 +69,8 @@ public class DeleteSiteMemberSanityTests extends RestTest
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, siteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.SANITY })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site contributor does not have permission to delete another member of the site")
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify site contributor does not have permission to delete another member of the site")
public void siteContributorIsNotAbleToDeleteSiteMember() throws JsonToModelConversionException, DataPreparationException, Exception
{
UserModel newUser = dataUser.createRandomTestUser("testUser");
@@ -83,8 +83,8 @@ public class DeleteSiteMemberSanityTests extends RestTest
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, siteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.SANITY })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site consumer does not have permission to delete another member of the site")
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify site consumer does not have permission to delete another member of the site")
public void siteConsumerIsNotAbleToDeleteSiteMember() throws JsonToModelConversionException, DataPreparationException, Exception
{
UserModel newUser = dataUser.createRandomTestUser("testUser");
@@ -97,8 +97,8 @@ public class DeleteSiteMemberSanityTests extends RestTest
.containsSummary(String.format(RestErrorModel.NOT_SUFFICIENT_PERMISSIONS, siteModel.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.SANITY })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user is not able to delete another member of the site")
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify unauthenticated user is not able to delete another member of the site")
public void unauthenticatedUserIsNotAbleToDeleteSiteMember() throws JsonToModelConversionException, DataPreparationException, Exception
{
restClient.authenticateUser(new UserModel("random user", "random password"));
@@ -36,8 +36,8 @@ public class GetPeopleCoreTests extends RestTest
dataUser.usingUser(userModel).addUserToSite(managerUser, siteModel, UserRole.SiteManager);
inexistentUser = new UserModel("inexistentUser", "password");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify inexistent user cannot get a person with Rest API and response is 401")
public void inexistentUserIsUnauthorizedToGetPerson() throws Exception
{
@@ -45,8 +45,8 @@ public class GetPeopleCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.UNAUTHORIZED);
restClient.assertLastError().containsSummary(RestErrorModel.AUTHENTICATION_FAILED);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user cannot get a person that doesn't exists with Rest API and response is 404")
public void userCannotGetInexistentPerson() throws Exception
{
@@ -24,7 +24,6 @@ public class GetPeopleFullTests extends RestTest
UserModel searchedUser, managerUser;
UserModel adminUser;
private RestPersonModel personModel;
private String domain = "@tas-automation.org";
@BeforeClass(alwaysRun = true)
public void dataPreparation() throws Exception
@@ -36,20 +35,8 @@ public class GetPeopleFullTests extends RestTest
managerUser = dataUser.usingAdmin().createRandomTestUser();
dataUser.usingUser(userModel).addUserToSite(managerUser, siteModel, UserRole.SiteManager);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user gets person using '-me-' instead of personId with Rest API and response is successful")
public void checkGetPersonIsSuccessfulForMe() throws Exception
{
personModel = restClient.authenticateUser(managerUser).withCoreAPI().usingMe().getPerson();
restClient.assertStatusCodeIs(HttpStatus.OK);
personModel.assertThat().field("id").is(managerUser.getUsername())
.and().field("firstName").is(managerUser.getUsername() + " FirstName")
.and().field("email").is(managerUser.getUsername() + domain)
.and().field("emailNotificationsEnabled").is("true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify entry details for get person response with Rest API")
public void checkResponseSchemaForGetPerson() throws Exception
{
@@ -77,7 +64,7 @@ public class GetPeopleFullTests extends RestTest
.and().field("emailNotificationsEnabled").is(newUser.getEmailNotificationsEnabled());
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user gets a person with special chars in username with Rest API and response is not found")
public void userChecksIfPersonWithSpecilCharsInUsernameIsNotFound() throws Exception
{
@@ -93,7 +80,7 @@ public class GetPeopleFullTests extends RestTest
.stackTraceIs(RestErrorModel.STACKTRACE);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user gets a person with empty personId with Rest API and response is successful")
public void userGetPersonWithEmptyPersonId() throws Exception
{
@@ -104,7 +91,7 @@ public class GetPeopleFullTests extends RestTest
persons.assertThat().entriesListIsNotEmpty();
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify user gets admin user with Rest API and response is successful")
public void managerUserGetAdminPerson() throws Exception
{
@@ -43,17 +43,7 @@ public class GetSiteMembershipCoreTests extends RestTest
dataUser.usingAdmin().addUserToSite(moderatedSiteManager, moderatedSite, UserRole.SiteManager);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify request using -me- string in place of personId returns site membership information for currently authenticated user.")
public void getSiteMembershipUsingMe() throws Exception
{
restClient.authenticateUser(publicSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator));
restSiteEntry = restClient.withCoreAPI().usingMe().getSiteMembership(publicSite);
restClient.assertStatusCodeIs(HttpStatus.OK);
restSiteEntry.assertThat().field("role").is(UserRole.SiteCollaborator).and().field("id").is(publicSite.getId()).and().field("site").isNotEmpty();
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
// @Bug(id = "REPO-1642", description = "reproduced on 5.2.1 only, it works on 5.2.0")
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify get site membership for a site returns status 404 when personId does not exist.")
public void getSiteMembershipUsingNonExistentPersonId() throws Exception
@@ -64,7 +54,7 @@ public class GetSiteMembershipCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND).assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, "someUser"));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify get site membership for a site returns status 404 when siteId does not exist.")
public void getSiteMembershipUsingNonExistentSiteId() throws Exception
{
@@ -75,7 +65,7 @@ public class GetSiteMembershipCoreTests extends RestTest
.containsSummary(String.format(RestErrorModel.RELATIONSHIP_NOT_FOUND, regularUser.getUsername(), "someSite"));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify get site membership for a site returns status 404 when personId is not a site member.")
public void getSiteMembershipForPersonThatIsNotSiteMember() throws Exception
{
@@ -84,7 +74,7 @@ public class GetSiteMembershipCoreTests extends RestTest
.containsSummary(String.format(RestErrorModel.RELATIONSHIP_NOT_FOUND, regularUser.getUsername(), publicSite.getTitle()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify regular user is not able to retrieve site membership information of a private site member.")
public void regularUserIsNotAbleToRetrieveSiteMembershipForPrivateSiteManager() throws Exception
{
@@ -93,7 +83,7 @@ public class GetSiteMembershipCoreTests extends RestTest
.containsSummary(String.format(RestErrorModel.RELATIONSHIP_NOT_FOUND, privateSiteManager.getUsername(), privateSite.getTitle()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify regular user is able to retrieve site membership information of a moderated site member.")
public void regularUserGetsSiteMembershipForModeratedSiteMember() throws Exception
{
@@ -102,16 +92,7 @@ public class GetSiteMembershipCoreTests extends RestTest
restSiteEntry.assertThat().field("role").is(UserRole.SiteManager).and().field("id").is(moderatedSite.getId()).and().field("site").isNotEmpty();
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify regular user is able to retrieve site membership information of a public site member.")
public void regularUserGetsSiteMembershipForPublicSiteMember() throws Exception
{
restSiteEntry = restClient.authenticateUser(regularUser).withCoreAPI().usingUser(publicSiteManager).getSiteMembership(publicSite);
restClient.assertStatusCodeIs(HttpStatus.OK);
restSiteEntry.assertThat().field("role").is(UserRole.SiteManager).and().field("id").is(publicSite.getId()).and().field("site").isNotEmpty();
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify if Admin user is able to retrieve site membership information of him.")
public void adminGetsSiteMembershipForHim() throws Exception
{
@@ -120,7 +101,7 @@ public class GetSiteMembershipCoreTests extends RestTest
restSiteEntry.assertThat().field("role").is(UserRole.SiteManager).and().field("id").is(privateSite.getId()).and().field("site").isNotEmpty();
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify if Admin user is able to retrieve site membership information of him.")
public void getSiteMembershipAfterRemovingASiteMember() throws Exception
{
@@ -32,8 +32,8 @@ public class GetSiteMembershipFullTests extends RestTest
publicSiteUsers = dataUser.addUsersWithRolesToSite(publicSite, UserRole.SiteManager, UserRole.SiteCollaborator, UserRole.SiteConsumer,
UserRole.SiteContributor);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify that properties parameter is applied.")
public void checkThatPropertiesParameterIsApplied() throws Exception
{
@@ -45,8 +45,8 @@ public class GetSiteMembershipFullTests extends RestTest
.and().field("site").isNotEmpty()
.and().field("guid").isNull();
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify that regular user "
+ "is able to retrieve site membership information of admin.")
public void regularUserGetsSiteMembershipForAdmin() throws Exception
@@ -57,8 +57,8 @@ public class GetSiteMembershipFullTests extends RestTest
.and().field("id").is(publicSite.getId())
.and().field("site.id").is(publicSite.getId());
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify that regular user "
+ "is able to retrieve site membership details for a Collaborator role.")
public void getSiteMembershipDetailsForACollaboratorRole() throws Exception
@@ -76,8 +76,8 @@ public class GetSiteMembershipFullTests extends RestTest
.and().field("site.preset").is("site-dashboard")
.and().field("site.title").is(publicSite.getTitle());
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify that regular user "
+ "is able to retrieve site membership details for a Contributor role.")
public void getSiteMembershipDetailsForAContributorRole() throws Exception
@@ -89,8 +89,8 @@ public class GetSiteMembershipFullTests extends RestTest
.and().field("id").is(publicSite.getId())
.and().field("site").isNotEmpty();
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify that regular user "
+ "is able to retrieve site membership details for a Consumer role.")
public void getSiteMembershipDetailsForAConsumerRole() throws Exception
@@ -102,8 +102,8 @@ public class GetSiteMembershipFullTests extends RestTest
.and().field("id").is(publicSite.getId())
.and().field("site").isNotEmpty();
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "As regular user make a request to join a moderated site."
+ " The request is pending. Check membership details.")
public void pendingRequestToASiteCheckMembershipDetails() throws Exception
@@ -116,8 +116,8 @@ public class GetSiteMembershipFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND).assertLastError()
.containsSummary(String.format(RestErrorModel.RELATIONSHIP_NOT_FOUND, regularUser.getUsername(), moderatedSite.getTitle()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "As Collaborator user leave site and perform get call."
+ "Check default error model schema.")
public void leaveSiteAndPerformGetCallCheckDefaultErrorModelSchema() throws Exception
@@ -32,16 +32,7 @@ public class GetSitesMembershipInformationCoreTests extends RestTest
dataUser.addUserToSite(leaveSiteUserModel, publicSiteModel, UserRole.SiteCollaborator);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify site manager is able to retrieve site membership information with -me- as personId")
public void siteManagerCanRetrieveSiteMembershipInformationWithMeAsPersonId() throws Exception
{
restClient.authenticateUser(userModel).withCoreAPI().usingMe().getSitesMembershipInformation().assertThat().entriesListIsNotEmpty().and()
.paginationExist().and().paginationField("count").isNot("0");
restClient.assertStatusCodeIs(HttpStatus.OK);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify site manager is not able to retrieve site membership information for a personId that does not exist")
public void siteManagerCantRetrieveSiteMembershipInformationForAPersonIdThatDoesNotExist() throws Exception
{
@@ -54,7 +45,7 @@ public class GetSitesMembershipInformationCoreTests extends RestTest
.stackTraceIs(RestErrorModel.STACKTRACE);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify if get site membership information request returns status code 400 when invalid maxItems parameter is used")
public void getSiteMembershipInformationRequestReturns400ForInvalidMaxItemsParameter() throws Exception
{
@@ -72,7 +63,7 @@ public class GetSitesMembershipInformationCoreTests extends RestTest
restClient.assertLastError().containsSummary(String.format(RestErrorModel.INVALID_MAXITEMS, "test"));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify if get site membership information request returns status code 200 for valid maxItems parameter")
public void getSiteMembershipInformationRequestReturns200ForValidMaxItemsParameter() throws Exception
{
@@ -81,7 +72,7 @@ public class GetSitesMembershipInformationCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.OK);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify if get site membership information request returns status code 400 when invalid skipCount parameter is used")
public void getSiteMembershipInformationRequestReturns400ForInvalidSkipCountParameter() throws Exception
{
@@ -98,7 +89,7 @@ public class GetSitesMembershipInformationCoreTests extends RestTest
.stackTraceIs(RestErrorModel.STACKTRACE);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify if get site membership information request returns status code 200 for valid skipCount parameter")
public void getSiteMembershipInformationRequestReturns200ForValidSkipCountParameter() throws Exception
{
@@ -107,7 +98,7 @@ public class GetSitesMembershipInformationCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.OK);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify site manager is able to retrieve public sites")
public void siteManagerCheckThatPublicSitesAreRetrieved() throws Exception
{
@@ -116,7 +107,7 @@ public class GetSitesMembershipInformationCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.OK);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify site manager is able to retrieve moderated sites")
public void siteManagerCheckThatModeratedSitesAreRetrieved() throws Exception
{
@@ -125,7 +116,7 @@ public class GetSitesMembershipInformationCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.OK);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify site manager is able to retrieve private sites")
public void siteManagerCheckThatPrivateSitesAreRetrieved() throws Exception
{
@@ -134,7 +125,7 @@ public class GetSitesMembershipInformationCoreTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.OK);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION, description = "Verify site member is able to leave site")
public void siteMemberIsAbleToLeaveSite() throws Exception
{
@@ -43,7 +43,7 @@ public class GetSitesMembershipInformationFullTests extends RestTest
dataUser.addUserToSite(anotherUserModel, anotherUserSite, UserRole.SiteCollaborator);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION,
description = "Verify if get site membership information request returns status code 200 for valid properties parameter")
public void getSiteMembershipInformationUsingPropertiesParameter() throws Exception
@@ -58,8 +58,8 @@ public class GetSitesMembershipInformationFullTests extends RestTest
.and().entriesListDoesNotContain("role")
.and().entriesListDoesNotContain("guid");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION,
description = "Verify if get site membership information request returns status code 200 for order ASC by parameter")
public void getSiteMembershipInformationUsingOrderAscByParameter() throws Exception
@@ -69,8 +69,8 @@ public class GetSitesMembershipInformationFullTests extends RestTest
sitesMembershipInformation.assertThat().entriesListIsNotEmpty().getPagination().assertThat().field("count").is("3");
sitesMembershipInformation.assertThat().entriesListIsSortedAscBy("id");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION,
description = "Verify if get site membership information request returns status code 200 for order DESC by parameter")
public void getSiteMembershipInformationUsingOrderDescByParameter() throws Exception
@@ -80,19 +80,8 @@ public class GetSitesMembershipInformationFullTests extends RestTest
sitesMembershipInformation.assertThat().entriesListIsNotEmpty().getPagination().assertThat().field("count").is("3");
sitesMembershipInformation.assertThat().entriesListIsSortedDescBy("id");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION,
description = "Verify if get site membership information request returns status code 200 for order by parameter")
public void getSiteMembershipInformationUsingOrderByParameter() throws Exception
{
sitesMembershipInformation = restClient.authenticateUser(userModel).withParams("orderBy=id").withCoreAPI().usingAuthUser().getSitesMembershipInformation();
restClient.assertStatusCodeIs(HttpStatus.OK);
sitesMembershipInformation.assertThat().entriesListIsNotEmpty().getPagination().assertThat().field("count").is("3");
sitesMembershipInformation.assertThat().entriesListIsSortedAscBy("id");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION,
description = "Verify if get site membership information request returns status code 200 for order by role parameter")
public void getSiteMembershipInformationUsingOrderByRoleParameter() throws Exception
@@ -102,8 +91,8 @@ public class GetSitesMembershipInformationFullTests extends RestTest
sitesMembershipInformation.assertThat().entriesListIsNotEmpty().getPagination().assertThat().field("count").is("3");
sitesMembershipInformation.assertThat().entriesListIsSortedAscBy("role");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION,
description = "Verify if user gets site membership information of another user successfully")
public void userCanGetSiteMembershipInformationOfAnotherUser() throws Exception
@@ -122,8 +111,8 @@ public class GetSitesMembershipInformationFullTests extends RestTest
.and().field("guid").is(anotherUserSite.getGuid())
.and().field("role").is(UserRole.SiteCollaborator.toString());
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION,
description = "Verify if get site membership information request returns status code 200 for relations parameter")
public void getSiteMembershipInformationUsingRelationsParameter() throws Exception
@@ -132,8 +121,8 @@ public class GetSitesMembershipInformationFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.OK);
sitesMembershipInformation.assertThat().entriesListIsNotEmpty().getPagination().assertThat().field("count").is("3");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION,
description = "Verify get site membership information request when a site membership request is rejected")
public void getSiteMembershipInformationWhenASiteRequestIsRejected() throws Exception
@@ -156,8 +145,8 @@ public class GetSitesMembershipInformationFullTests extends RestTest
sitesMembershipInformation.assertThat().entriesListIsEmpty()
.and().paginationField("count").is("0");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION,
description = "Verify get site membership information request when a site membership request is approved")
public void getSiteMembershipInformationWhenASiteRequestIsAppropved() throws Exception
@@ -183,8 +172,8 @@ public class GetSitesMembershipInformationFullTests extends RestTest
.and().entriesListContains("id", moderatedSiteModel.getId())
.and().paginationField("count").is("1");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION,
description = "Verify if get site membership information request returns status code 200 for valid maxItems parameter")
public void getSiteMembershipInformationUsingMaxItemsParameter() throws Exception
@@ -198,8 +187,8 @@ public class GetSitesMembershipInformationFullTests extends RestTest
.and().field("skipCount").is("0")
.and().field("maxItems").is("2");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.REGRESSION,
description = "Verify if get site membership information request returns status code 200 for valid skipCount parameter")
public void getSiteMembershipInformationUsingSkipCountParameter() throws Exception
@@ -50,7 +50,7 @@ public class GetPeopleActivitiesCoreTests extends RestTest
restActivityModelsCollection.assertThat().paginationField("count").is("4");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user cannot get activities for inexistent user with Rest API and response is 404")
public void userCannotGetPeopleActivitiesForInexistentPersonId() throws Exception
{
@@ -64,7 +64,7 @@ public class GetPeopleActivitiesCoreTests extends RestTest
.stackTraceIs(RestErrorModel.STACKTRACE);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets its activities for inexistent siteId with Rest API and response is 404")
public void userGetItsPeopleActivitiesForInexistentSite() throws Exception
{
@@ -76,7 +76,7 @@ public class GetPeopleActivitiesCoreTests extends RestTest
.stackTraceIs(RestErrorModel.STACKTRACE);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets activities with invald skipCount parameter with Rest API and response is 400")
public void userGetPeopleActivitiesUsingInvalidSkipCountParameter() throws Exception
{
@@ -88,7 +88,7 @@ public class GetPeopleActivitiesCoreTests extends RestTest
.descriptionURLIs(RestErrorModel.RESTAPIEXPLORER);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets activities with invalid maxItems parameter with Rest API and response is 400")
public void userGetPeopleActivitiesUsingInvalidMaxItemsParameter() throws Exception
{
@@ -100,7 +100,7 @@ public class GetPeopleActivitiesCoreTests extends RestTest
.descriptionURLIs(RestErrorModel.RESTAPIEXPLORER);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE, TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets activities using invalid value for parameter 'who'with Rest API and response is 400")
public void userGetsPeopleActivitiesUsingInvalidValueForWhoParameter() throws Exception
{
@@ -112,7 +112,7 @@ public class GetPeopleActivitiesCoreTests extends RestTest
.descriptionURLIs(RestErrorModel.RESTAPIEXPLORER);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE, TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets activities successfully using parameter 'who' with 'others' value with Rest API")
public void userGetsPeopleActivitiesUsingOthersForWhoParameter() throws Exception
{
@@ -1,15 +1,11 @@
package org.alfresco.rest.people.activities;
import java.util.ArrayList;
import java.util.List;
import org.alfresco.dataprep.CMISUtil.DocumentType;
import org.alfresco.rest.RestTest;
import org.alfresco.rest.model.RestActivityModel;
import org.alfresco.rest.model.RestActivityModelsCollection;
import org.alfresco.rest.model.RestActivitySummaryModel;
import org.alfresco.rest.model.RestErrorModel;
import org.alfresco.utility.constants.ActivityType;
import org.alfresco.utility.constants.UserRole;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FolderModel;
@@ -20,7 +16,6 @@ import org.alfresco.utility.report.Bug;
import org.alfresco.utility.testrail.ExecutionType;
import org.alfresco.utility.testrail.annotation.TestRail;
import org.springframework.http.HttpStatus;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -57,28 +52,8 @@ public class GetPeopleActivitiesFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.OK);
restActivityModelsCollection.assertThat().paginationField("count").is("4");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.FULL })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets its activities using me with Rest API and response is successful")
public void userGetsItsPeopleActivitiesUsingMe() throws Exception
{
restActivityModelsCollection = restClient.authenticateUser(userModel).withCoreAPI().usingMe().getPersonActivities();
restClient.assertStatusCodeIs(HttpStatus.OK);
restActivityModelsCollection.assertThat().paginationField("count").is("4");
List<RestActivitySummaryModel> allActivitySummary = new ArrayList<RestActivitySummaryModel>();
for (RestActivityModel activityModel: restActivityModelsCollection.getEntries())
{
allActivitySummary.add(activityModel.onModel().getActivitySummary());
}
assertActivitySummaryTitleIsPresent(allActivitySummary, fileInSite1.getName());
assertActivitySummaryTitleIsPresent(allActivitySummary, folderInSite2.getName());
assertActivitySummaryTitleIsPresent(allActivitySummary, fileInSite2.getName());
restActivityModelsCollection.assertThat().entriesListContains("activityType", ActivityType.USER_JOINED.toString());
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify activity summary from user gets activities response with Rest API")
public void userGetPeopleActivitiesWithActivitySummaryCheck() throws Exception
{
@@ -91,9 +66,9 @@ public class GetPeopleActivitiesFullTests extends RestTest
.and().field("title").is(fileInSite1.getName())
.and().field("objectId").is(fileInSite1.getNodeRefWithoutVersion());
}
@Bug(id = "REPO-1911")
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE,TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user cannot get activities for empty user with Rest API and response is 400")
public void userCannotGetPeopleActivitiesForEmptyPersonId() throws Exception
{
@@ -106,20 +81,8 @@ public class GetPeopleActivitiesFullTests extends RestTest
.stackTraceIs(RestErrorModel.STACKTRACE)
.descriptionURLIs(RestErrorModel.RESTAPIEXPLORER);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.FULL })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE, TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets activities successfully using parameter 'who' with 'me' value with Rest API")
public void userGetsPeopleActivitiesUsingMeForWhoParameter() throws Exception
{
restActivityModelsCollection = restClient.authenticateUser(userModel).withCoreAPI().usingUser(userModel).usingParams("who=me").getPersonActivities();
restClient.assertStatusCodeIs(HttpStatus.OK);
restActivityModelsCollection.assertThat().paginationField("count").is("2");
restActivityModelsCollection.assertThat().entriesListContains("postPersonId", userModel.getUsername().toLowerCase())
.and().entriesListDoesNotContain("postPersonId", adminUser.getUsername().toLowerCase())
.and().entriesListDoesNotContain("postPersonId", managerUser.getUsername().toLowerCase());
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE,TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets its activities for siteId specified in siteId parameter using me with Rest API and response is successful")
public void userGetItsPeopleActivitiesForASpecificSite() throws Exception
{
@@ -129,8 +92,8 @@ public class GetPeopleActivitiesFullTests extends RestTest
restActivityModelsCollection.assertThat().entriesListContains("siteId", siteModel1.getId())
.and().entriesListDoesNotContain("siteId", siteModel2.getId());
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets activities for user with no activities with Rest API and response is successful")
public void userGetPeopleActivitiesForUserWithNoActivities() throws Exception
{
@@ -142,20 +105,8 @@ public class GetPeopleActivitiesFullTests extends RestTest
restActivityModelsCollection.assertThat().paginationField("count").is("0");
restActivityModelsCollection.assertThat().entriesListIsEmpty();
}
private void assertActivitySummaryTitleIsPresent(List<RestActivitySummaryModel> allActivitySummary, String title)
{
for (RestActivitySummaryModel activitySummary: allActivitySummary)
{
if (activitySummary.getTitle().equals(title))
{
Assert.assertEquals(activitySummary.getTitle(), title, String.format("%s title was not found in Activity Summary", title));
break;
}
}
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user cannot get activities for siteId that user doesn't have access to with Rest API and response is not found")
public void userGetPeopleActivitiesForASiteWithNoAccess() throws Exception
{
@@ -165,8 +116,8 @@ public class GetPeopleActivitiesFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND);
restClient.assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, siteNoAccess.getId()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user cannot get activities for another user with Rest API and response is permission denied")
public void userGetPeopleActivitiesForAnotherUser() throws Exception
{
@@ -174,8 +125,8 @@ public class GetPeopleActivitiesFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN);
restClient.assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets activities with properties parameter applied with Rest API and response is successful")
public void userGetPeopleActivitiesUsingPropertiesParameter() throws Exception
{
@@ -192,8 +143,8 @@ public class GetPeopleActivitiesFullTests extends RestTest
.and().entriesListDoesNotContain("id")
.and().entriesListDoesNotContain("activityType");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets activities with skipCount parameter applied with Rest API and response is successful")
public void userGetPeopleActivitiesUsingSkipCountParameter() throws Exception
{
@@ -211,8 +162,8 @@ public class GetPeopleActivitiesFullTests extends RestTest
restActivityModelsCollection.getEntries().get(1).onModel().assertThat().field("postPersonId").is(expectedRestActivity4.getPostPersonId())
.and().field("activityType").is(expectedRestActivity4.getActivityType());
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.ACTIVITIES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets activities with maxItems parameter applied with Rest API and response is successful")
public void userGetPeopleActivitiesUsingMaxItemsParameter() throws Exception
{
@@ -24,7 +24,7 @@ public class GetPeoplePreferenceCoreTests extends RestTest
dataSite.usingUser(userModel).usingSite(siteModel).addSiteToFavorites();
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify user is Forbidden to get a specific preference for another user with Rest API and response is 403")
public void userDoesNotHaveAccessToFavoriteSitesOfAnotherUser() throws Exception
{
@@ -35,7 +35,7 @@ public class GetPeoplePreferenceCoreTests extends RestTest
restClient.assertLastError().containsSummary("Permission was denied");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify manager fails to get a specific preference for an invalid user with Rest API and response is 404")
public void statusNotFoundIsReturnedForAPersonIDThatDoesNotExist() throws Exception
{
@@ -45,7 +45,7 @@ public class GetPeoplePreferenceCoreTests extends RestTest
restClient.assertLastError().containsSummary("The entity with id: invalidPersonID was not found");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify manager fails to get a specific preference for an invalid preference with Rest API and response is 404")
public void statusNotFoundIsReturnedForAPreferenceNameThatDoesNotExist() throws Exception
{
@@ -56,7 +56,7 @@ public class GetPeoplePreferenceCoreTests extends RestTest
userModel.getUsername()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify manager fails to get a specific preference for removed preference with Rest API and response is 404")
public void statusNotFoundIsReturnedForAPreferenceNameThatHasBeenRemoved() throws Exception
{
@@ -34,7 +34,7 @@ public class GetPeoplePreferenceFullTests extends RestTest
dataSite.usingUser(userModel).usingSite(siteModel).addSiteToFavorites();
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Check default error schema in case of failure")
public void checkDefaultErrorSchema() throws Exception
@@ -48,21 +48,8 @@ public class GetPeoplePreferenceFullTests extends RestTest
.stackTraceIs(RestErrorModel.STACKTRACE)
.containsErrorKey(RestErrorModel.ENTITY_NOT_FOUND_ERRORKEY);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Specify -me- string in place of <personid> for request")
public void preferenceIsReturnedWhenUsingMeAsPersonId() throws Exception
{
restPreferenceModel = restClient.authenticateUser(userModel).withCoreAPI().usingMe()
.getPersonPreferenceInformation(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId()));
restClient.assertStatusCodeIs(HttpStatus.OK);
restPreferenceModel.assertThat().field("id").is(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId()))
.and().field("value").is("true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Check that properties parameter is applied")
public void propertiesParameterIsAppliedWhenRetrievingPreference() throws Exception
@@ -80,7 +67,7 @@ public class GetPeoplePreferenceFullTests extends RestTest
.and().field("value").is("true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Validate ID element in get site preference response")
public void validateIdElementInGetSitePreferenceResponse() throws Exception
@@ -91,7 +78,7 @@ public class GetPeoplePreferenceFullTests extends RestTest
.and().field("value").is("true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE, TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Validate ID element in get folder preference response")
public void validateIdElementInGetFolderPreferenceResponse() throws Exception
@@ -106,7 +93,7 @@ public class GetPeoplePreferenceFullTests extends RestTest
.and().field("value").is(Utility.removeLastSlash(Utility.buildPath("workspace://SpacesStore", folderFavorite.getNodeRef())));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE, TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Validate ID element in get file preference response")
public void validateIdElementInGetFilePreferenceResponse() throws Exception
@@ -121,7 +108,7 @@ public class GetPeoplePreferenceFullTests extends RestTest
.and().field("value").is(Utility.removeLastSlash(Utility.buildPath("workspace://SpacesStore", fileFavorite.getNodeRefWithoutVersion())));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Get preference of an user that has no preferences")
public void getPreferenceForUserWithoutPreferences() throws Exception
@@ -147,10 +134,10 @@ public class GetPeoplePreferenceFullTests extends RestTest
PreferenceName.SITES_FAVORITES_PREFIX.toString()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Change one preference for an user then perform get call")
@Bug(id = "ACE-5736")
// @Bug(id = "ACE-5736")
public void changePreferenceThenPerformGetPreferenceCall() throws Exception
{
UserModel newUser = dataUser.createRandomTestUser();
@@ -195,7 +182,7 @@ public class GetPeoplePreferenceFullTests extends RestTest
PreferenceName.FOLDERS_FAVORITES_PREFIX.toString()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Verify admin is able to get preference of another user")
public void adminIsAbleToGetOtherUserPreference() throws Exception
@@ -206,7 +193,7 @@ public class GetPeoplePreferenceFullTests extends RestTest
restPreferenceModel.assertThat().field("id").is(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId())).and().field("value").is("true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Verify regular user is not able to get preference of admin user")
public void regularUserIsNotAbleToGetAdminPreference() throws Exception
@@ -39,7 +39,7 @@ public class GetPeoplePreferencesCoreTests extends RestTest
dataContent.usingUser(user1).usingSite(siteModel).addFolderToFavorites(folderModel);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE, TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets its preferences with invalid maxItems parameter with Rest API and response is 400")
public void userGetsPeoplePreferencesUsingInvalidMaxItemsParameter() throws Exception
{
@@ -51,7 +51,7 @@ public class GetPeoplePreferencesCoreTests extends RestTest
.descriptionURLIs(RestErrorModel.RESTAPIEXPLORER);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets its preferences with skipCount parameter applied with Rest API and response is successful")
public void userGetsPeoplePreferencesUsingInvalidSkipCountParameter() throws Exception
{
@@ -63,7 +63,7 @@ public class GetPeoplePreferencesCoreTests extends RestTest
.descriptionURLIs(RestErrorModel.RESTAPIEXPLORER);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE, TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify user which doesn't have access to another user preferences fails to get its preferences with Rest API and response is permission denied")
public void userWithNoAccessToOtherUserPreferencesIsForbiddenToGetItsPreferences() throws Exception
{
@@ -78,7 +78,7 @@ public class GetPeoplePreferencesCoreTests extends RestTest
.descriptionURLIs(RestErrorModel.RESTAPIEXPLORER);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE, TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify user fails to get preferences for inexistent personId with Rest API and response is 404")
public void userCannotGetPeoplePreferencesForInexistentPersonId() throws Exception
{
@@ -92,7 +92,7 @@ public class GetPeoplePreferencesCoreTests extends RestTest
.stackTraceIs(RestErrorModel.STACKTRACE);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify user get preferences for a user with no preferences with Rest API and response is empty")
public void userGetsPeoplePreferencesForUserWithNoPreferences() throws Exception
{
@@ -104,7 +104,7 @@ public class GetPeoplePreferencesCoreTests extends RestTest
restPreferenceModelsCollection.assertThat().entriesListIsEmpty();
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.CORE })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE, TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify user fails to get preferences for a removed preference with Rest API and response is 404")
public void userFailsToGetPeoplePreferencesIfPreferenceWasRemoved() throws Exception
{
@@ -39,24 +39,8 @@ public class GetPeoplePreferencesFullTests extends RestTest
dataSite.usingUser(user1).usingSite(siteModel).addSiteToFavorites();
dataContent.usingUser(user1).usingSite(siteModel).addFolderToFavorites(folderModel);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.FULL })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets its preferences using me with Rest API and response is successful")
public void userGetsItsPeoplePreferencesUsingMe() throws Exception
{
restPreferenceModelsCollection = restClient.authenticateUser(user1).withCoreAPI().usingMe().getPersonPreferences();
restClient.assertStatusCodeIs(HttpStatus.OK);
restPreferenceModelsCollection.assertThat().paginationField("count").is("4");
restPreferenceModelsCollection.assertThat().entriesListIsNotEmpty()
.and().entriesListContains("id", String.format(PreferenceName.EXT_FOLDERS_FAVORITES_PREFIX.toString(), "workspace://SpacesStore/" + folderModel.getNodeRef()))
.and().entriesListContains("id", String.format(PreferenceName.EXT_SITES_FAVORITES_PREFIX.toString(), siteModel.getId()))
.and().entriesListContains("id", PreferenceName.FOLDERS_FAVORITES_PREFIX.toString())
.and().entriesListContains("value", "workspace://SpacesStore/" + folderModel.getNodeRef())
.and().entriesListContains("id", String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId()))
.and().entriesListContains("value", "true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets its preferences with skipCount parameter applied with Rest API and response is successful")
public void userGetsItsPeoplePreferencesUsingSkipCountParameter() throws Exception
{
@@ -73,7 +57,7 @@ public class GetPeoplePreferencesFullTests extends RestTest
.and().entriesListContains("value", "true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE, TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets its preferences with maxItems parameter applied with Rest API and response is successful")
public void userGetsItsPeoplePreferencesUsingMaxItemsParameter() throws Exception
{
@@ -90,7 +74,7 @@ public class GetPeoplePreferencesFullTests extends RestTest
.and().entriesListDoesNotContain("value", "true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets admin preferences with Rest API and response is permission denied")
public void userIsForbiddenToGetAdminPreferences() throws Exception
{
@@ -102,7 +86,7 @@ public class GetPeoplePreferencesFullTests extends RestTest
.descriptionURLIs(RestErrorModel.RESTAPIEXPLORER);
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify user gets its preferences with skipCount parameter higher then no of entries with Rest API and response is empty")
public void userGetsItsPeoplePreferencesUsingHighSkipCount() throws Exception
{
@@ -113,8 +97,8 @@ public class GetPeoplePreferencesFullTests extends RestTest
restPreferenceModelsCollection.assertThat().entriesListIsEmpty();
}
@Bug(id = "REPO-1911")
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.FULL })
// @Bug(id = "REPO-1911")
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION, description = "Verify user cannot get preferences for empty user with Rest API and response is 400")
public void userGetsItsPeoplePreferencesForEmptyPersonId() throws Exception
{
@@ -35,7 +35,7 @@ public class CreateRenditionTests extends RestTest
{
adminUser = dataUser.getAdminUser();
user = dataUser.createRandomTestUser();
site = dataSite.usingUser(user).createPublicRandomSite();
site = dataSite.usingUser(user).createPublicRandomSite();
}
@BeforeMethod(alwaysRun = true)
@@ -58,9 +58,9 @@ public class CreateRenditionTests extends RestTest
}
@Bug(id = "REPO-2042", description = "Should fail only on MAC OS System and Linux", status = Status.FIXED )
@TestRail(section = { TestGroup.REST_API, TestGroup.RENDITIONS }, executionType = ExecutionType.SANITY,
@TestRail(section = { TestGroup.REST_API, TestGroup.RENDITIONS }, executionType = ExecutionType.REGRESSION,
description = "Verify user that created the document can also creates 'pdf' rendition for it with Rest API and status code is 202")
@Test(groups = { TestGroup.REST_API, TestGroup.RENDITIONS, TestGroup.SANITY })
@Test(groups = { TestGroup.REST_API, TestGroup.RENDITIONS, TestGroup.REGRESSION })
public void userThatCreatedFileCanCreatePdfRenditionForIt() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(user).withCoreAPI().usingNode(document).createNodeRendition("pdf");
@@ -71,9 +71,9 @@ public class CreateRenditionTests extends RestTest
}
@Bug(id = "REPO-2042", description = "Should fail only on MAC OS System and Linux", status = Status.FIXED )
@TestRail(section = { TestGroup.REST_API, TestGroup.RENDITIONS }, executionType = ExecutionType.SANITY,
@TestRail(section = { TestGroup.REST_API, TestGroup.RENDITIONS }, executionType = ExecutionType.REGRESSION,
description = "Verify user that created the document can also creates 'doclib' rendition for it with Rest API and status code is 202")
@Test(groups = { TestGroup.REST_API, TestGroup.RENDITIONS, TestGroup.SANITY })
@Test(groups = { TestGroup.REST_API, TestGroup.RENDITIONS, TestGroup.REGRESSION })
public void userThatCreatedFileCanCreateDoclibRenditionForIt() throws JsonToModelConversionException, Exception
{
FolderModel folder = dataContent.usingUser(user).usingSite(site).createFolder();
@@ -35,7 +35,7 @@ public class GetRenditionTests extends RestTest
public void dataPreparation() throws Exception
{
user = dataUser.createRandomTestUser();
site = dataSite.usingUser(user).createPublicRandomSite();
site = dataSite.usingUser(user).createPublicRandomSite();
}
@Bug(id = "REPO-2449", status = Status.FIXED)
@@ -36,7 +36,7 @@ public class GetSharedLinksFullTests extends RestTest
@Bug(id="REPO-2365")
@TestRail(section = { TestGroup.REST_API,
TestGroup.SHAREDLINKS }, executionType = ExecutionType.REGRESSION, description = "Verify that a user with permission can get allowableOperations on sharedLinks")
@Test(groups = { TestGroup.REST_API, TestGroup.SHAREDLINKS, TestGroup.FULL })
@Test(groups = { TestGroup.REST_API, TestGroup.REGRESSION })
public void getSharedLinksWithAllowableOperations() throws Exception
{
file = dataContent.usingUser(adminUser).usingSite(privateSite).createContent(DocumentType.TEXT_PLAIN);
@@ -65,19 +65,8 @@ public class SharedLinksSanityTests extends RestTest
file5 = dataContent.usingUser(adminUser).usingResource(folder1).createContent(DocumentType.TEXT_PLAIN);
}
@TestRail(section = { TestGroup.REST_API, TestGroup.SHAREDLINKS }, executionType = ExecutionType.REGRESSION, description = "Verify empty sharedLinks with and without Path")
@Test(groups = { TestGroup.REST_API, TestGroup.SHAREDLINKS })
public void testGetSharedLinksNoLinks() throws Exception
{
restClient.authenticateUser(testUser1).withCoreAPI().usingSharedLinks().getSharedLinks();
restClient.assertStatusCodeIs(HttpStatus.OK);
restClient.authenticateUser(testUser1).withCoreAPI().includePath().usingSharedLinks().getSharedLinks();
restClient.assertStatusCodeIs(HttpStatus.OK);
}
@TestRail(section = { TestGroup.REST_API, TestGroup.SHAREDLINKS }, executionType = ExecutionType.REGRESSION, description = "Verify create sharedLinks with and without Path")
@Test(groups = { TestGroup.REST_API, TestGroup.SHAREDLINKS })
@TestRail(section = { TestGroup.REST_API, TestGroup.SHAREDLINKS }, executionType = ExecutionType.SANITY, description = "Verify create sharedLinks with and without Path")
@Test(groups = { TestGroup.REST_API, TestGroup.SANITY })
public void testCreateAndGetSharedLinks() throws Exception
{
// Post without includePath
@@ -135,8 +124,8 @@ public class SharedLinksSanityTests extends RestTest
Assert.assertNull(sharedLink2.getPath(), "Path is expected to be null for noauth api: Response shows: " + sharedLink2.toJson());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.SHAREDLINKS }, executionType = ExecutionType.REGRESSION, description = "Verify delete sharedLinks with and without Path")
@Test(groups = { TestGroup.REST_API, TestGroup.SHAREDLINKS })
@TestRail(section = { TestGroup.REST_API, TestGroup.SHAREDLINKS }, executionType = ExecutionType.SANITY, description = "Verify delete sharedLinks with and without Path")
@Test(groups = { TestGroup.REST_API, TestGroup.SANITY })
public void testDeleteSharedLinks() throws Exception
{
sharedLink3 = restClient.authenticateUser(testUser1).withCoreAPI().usingSharedLinks().createSharedLink(file3);
@@ -149,7 +138,7 @@ public class SharedLinksSanityTests extends RestTest
}
@TestRail(section = { TestGroup.REST_API, TestGroup.SHAREDLINKS }, executionType = ExecutionType.REGRESSION, description = "Verify get sharedLink/content and get/renditions")
@Test(groups = { TestGroup.REST_API, TestGroup.SHAREDLINKS })
@Test(groups = { TestGroup.REST_API, TestGroup.REGRESSION })
public void testCreateWithExpiryDateAndGetSharedLinkRendition() throws Exception
{
sharedLink5 = restClient.authenticateUser(testUser1).withCoreAPI().includePath().usingSharedLinks().createSharedLinkWithExpiryDate(file5, expiryDate);