mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
[ACS-727] run tas-cmis tests on Atom and Webservices bindings (#96)
* ACS-727 - initial commit - add separate profiles for each binding - add travis jobs [tas] * mark atom / ws unsupported tests * some formatting to trigger [tas] tests * exclude tests due to raised bug [tas] * fix a few rest-api [tas] tests according with some recent changes from tas-utility * disable some unsupported [tas] cmis webservices tests and adapt a few others * - use TestGroup instead of hardcoded values - exclude renditions tests * trigger [tas] tests * - disable tests due to raised bugs - fix some incorrect tests - add ability to exclude tests separately on each binding [tas] * [tas] * - disable some more [tas] tests due to raised bug * - fix a few [tas] cmis tests and disable other not supported on ws * a bit of cleanup * trigger [tas] tests
This commit is contained in:
20
.travis.yml
20
.travis.yml
@@ -208,13 +208,29 @@ jobs:
|
||||
script:
|
||||
- travis_wait 60 mvn -B install -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part3 -Denvironment=default -DrunBugs=false
|
||||
|
||||
- name: "CMIS TAS tests"
|
||||
- name: "CMIS TAS tests - BROWSER binding"
|
||||
if: branch = master OR commit_message =~ /\[tas\]/
|
||||
before_script:
|
||||
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
|
||||
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
||||
script:
|
||||
- travis_wait 40 mvn -B install -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
|
||||
- travis_wait 40 mvn -B install -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-browser -Denvironment=default -DrunBugs=false
|
||||
|
||||
- name: "CMIS TAS tests - ATOM binding"
|
||||
if: branch = master OR commit_message =~ /\[tas\]/
|
||||
before_script:
|
||||
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
|
||||
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
||||
script:
|
||||
- travis_wait 40 mvn -B install -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-atom -Denvironment=default -DrunBugs=false
|
||||
|
||||
- name: "CMIS TAS tests - WEBSERVICES binding"
|
||||
if: branch = master OR commit_message =~ /\[tas\]/
|
||||
before_script:
|
||||
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
|
||||
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
||||
script:
|
||||
- travis_wait 40 mvn -B install -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-webservices -Denvironment=default -DrunBugs=false
|
||||
|
||||
- name: "Email TAS tests"
|
||||
if: branch = master OR commit_message =~ /\[tas\]/
|
||||
|
@@ -23,8 +23,40 @@
|
||||
|
||||
<properties>
|
||||
<suiteXmlFile>${project.basedir}/src/test/resources/cmis-suite.xml</suiteXmlFile>
|
||||
<cmis.binding></cmis.binding>
|
||||
<cmis.basePath></cmis.basePath>
|
||||
<excludedGroups></excludedGroups>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>run-cmis-browser</id>
|
||||
<properties>
|
||||
<cmis.binding>browser</cmis.binding>
|
||||
<cmis.basePath>/alfresco/api/-default-/public/cmis/versions/1.1/browser</cmis.basePath>
|
||||
<excludedGroups>not_supported_on_cmis_browser|renditions|bug-browser.*</excludedGroups>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>run-cmis-webservices</id>
|
||||
<properties>
|
||||
<cmis.binding>webservices</cmis.binding>
|
||||
<cmis.basePath>/alfresco/cmisws/cmis?wsdl</cmis.basePath>
|
||||
<excludedGroups>not_supported_on_cmis_ws|renditions|bug-ws.*</excludedGroups>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>run-cmis-atom</id>
|
||||
<properties>
|
||||
<cmis.binding>atom</cmis.binding>
|
||||
<cmis.basePath>/alfresco/api/-default-/public/cmis/versions/1.1/atom</cmis.basePath>
|
||||
<excludedGroups>not_supported_on_cmis_atom|renditions|bug-atom.*</excludedGroups>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.alfresco.tas</groupId>
|
||||
@@ -42,6 +74,10 @@
|
||||
<suiteXmlFiles>
|
||||
<suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
|
||||
</suiteXmlFiles>
|
||||
<systemProperties>
|
||||
<cmis.binding>${cmis.binding}</cmis.binding>
|
||||
<cmis.basePath>${cmis.basePath}</cmis.basePath>
|
||||
</systemProperties>
|
||||
<argLine>
|
||||
--illegal-access=warn
|
||||
</argLine>
|
||||
|
@@ -2,22 +2,14 @@ package org.alfresco.cmis;
|
||||
|
||||
import org.alfresco.utility.constants.UserRole;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
import org.alfresco.utility.model.FileModel;
|
||||
import org.alfresco.utility.model.FileType;
|
||||
import org.alfresco.utility.model.FolderModel;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.model.*;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.data.PermissionMapping;
|
||||
import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
|
||||
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisPermissionDeniedException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.*;
|
||||
import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumBasicPermissions;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -55,7 +47,7 @@ public class AclTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Site manager can get the acls for valid folder")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
public void siteManagerShouldGetFolderAcls() throws Exception
|
||||
{
|
||||
testFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -73,7 +65,7 @@ public class AclTests extends CmisTest
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo();
|
||||
cmisApi.usingResource(testFile).addAcl(inviteUser, UserRole.SiteContributor, AclPropagation.REPOSITORYDETERMINED)
|
||||
.then().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
.then().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@@ -85,7 +77,7 @@ public class AclTests extends CmisTest
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFolder(testFolder).and().assertThat().existsInRepo();
|
||||
cmisApi.usingResource(testFolder).addAcl(inviteUser, UserRole.SiteConsumer, AclPropagation.PROPAGATE)
|
||||
.then().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteConsumer);
|
||||
.then().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteConsumer);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@@ -97,7 +89,7 @@ public class AclTests extends CmisTest
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFolder(testFolder).and().assertThat().existsInRepo();
|
||||
cmisApi.usingResource(testFolder).addAcl(inviteUser, UserRole.SiteCollaborator, AclPropagation.OBJECTONLY)
|
||||
.then().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteCollaborator);
|
||||
.then().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteCollaborator);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@@ -111,19 +103,19 @@ public class AclTests extends CmisTest
|
||||
cmisApi.usingResource(testFolder).addAcl(inviteUser, UserRole.SiteCollaborator, AclPropagation.OBJECTONLY)
|
||||
.then().applyAcl(inviteUser, UserRole.SiteConsumer, UserRole.SiteCollaborator, AclPropagation.OBJECTONLY)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteConsumer)
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteCollaborator);
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteCollaborator);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify appply acl with invalid role that will be removed")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisConstraintException.class)
|
||||
description = "Verify apply acl with invalid role that will be removed")
|
||||
@Test(groups = { "bug-atom-REPO-5383", TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions=CmisConstraintException.class)
|
||||
public void applyAclWithInvalidAddedRole() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().addAcl(inviteUser, UserRole.SiteCollaborator, AclPropagation.OBJECTONLY)
|
||||
.then().applyAcl(inviteUser, UserRole.SiteConsumer, UserRole.SiteManager, AclPropagation.OBJECTONLY);
|
||||
.then().applyAcl(inviteUser, UserRole.SiteConsumer, UserRole.SiteManager, AclPropagation.OBJECTONLY);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
@@ -136,8 +128,8 @@ public class AclTests extends CmisTest
|
||||
.createFile(testFile)
|
||||
.and().addAcl(inviteUser, UserRole.SiteConsumer, AclPropagation.PROPAGATE)
|
||||
.when().applyAcl(inviteUser, UserRole.SiteManager, UserRole.SiteConsumer, AclPropagation.PROPAGATE)
|
||||
.assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteManager)
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteConsumer);
|
||||
.assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteManager)
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteConsumer);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@@ -150,8 +142,8 @@ public class AclTests extends CmisTest
|
||||
.createFile(testFile)
|
||||
.and().addAcl(inviteUser, UserRole.SiteConsumer, AclPropagation.OBJECTONLY)
|
||||
.when().applyAcl(inviteUser, UserRole.SiteManager, UserRole.SiteConsumer, AclPropagation.REPOSITORYDETERMINED)
|
||||
.assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteManager)
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteConsumer);
|
||||
.assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteManager)
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteConsumer);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@@ -164,7 +156,7 @@ public class AclTests extends CmisTest
|
||||
.createFile(testFile)
|
||||
.and().addAcl(inviteUser, UserRole.SiteConsumer, AclPropagation.OBJECTONLY)
|
||||
.when().removeAcl(inviteUser, UserRole.SiteConsumer, AclPropagation.REPOSITORYDETERMINED)
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteConsumer);
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteConsumer);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
@@ -177,7 +169,7 @@ public class AclTests extends CmisTest
|
||||
.createFile(testFile)
|
||||
.and().addAcl(inviteUser, UserRole.SiteManager, AclPropagation.OBJECTONLY)
|
||||
.when().removeAcl(inviteUser, UserRole.SiteManager, AclPropagation.PROPAGATE)
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteManager);
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteManager);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@@ -190,12 +182,12 @@ public class AclTests extends CmisTest
|
||||
.createFile(testFile)
|
||||
.and().addAcl(inviteUser, UserRole.SiteContributor, AclPropagation.OBJECTONLY)
|
||||
.when().removeAcl(inviteUser, UserRole.SiteContributor, AclPropagation.OBJECTONLY)
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Remove Acl for valid folder with AclPropagation set to REPOSITORYDETERMINED")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisConstraintException.class)
|
||||
@Test(groups = { "bug-atom-REPO-5383", TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions=CmisConstraintException.class)
|
||||
public void siteManagerCannotRemoveInvalidAcl() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.PDF);
|
||||
@@ -224,8 +216,8 @@ public class AclTests extends CmisTest
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.PDF, "content");
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile, VersioningState.CHECKEDOUT)
|
||||
.usingPWCDocument().addAcl(inviteUser, UserRole.SiteContributor, AclPropagation.PROPAGATE)
|
||||
.createFile(testFile, VersioningState.CHECKEDOUT)
|
||||
.usingPWCDocument().addAcl(inviteUser, UserRole.SiteContributor, AclPropagation.PROPAGATE)
|
||||
.then().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
@@ -236,8 +228,7 @@ public class AclTests extends CmisTest
|
||||
{
|
||||
FolderModel folder = FolderModel.getRandomFolderModel();
|
||||
folder.setCmisLocation("/" + folder.getName() + "/");
|
||||
cmisApi.authenticateUser(testUser)
|
||||
.usingResource(folder)
|
||||
cmisApi.authenticateUser(testUser).usingResource(folder)
|
||||
.assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
@@ -251,8 +242,8 @@ public class AclTests extends CmisTest
|
||||
.createFile(testFile)
|
||||
.and().addAcl(inviteUser, UserRole.SiteConsumer, AclPropagation.OBJECTONLY)
|
||||
.when().applyAcl(inviteUser, UserRole.SiteManager, UserRole.SiteConsumer, null)
|
||||
.assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteManager)
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteConsumer);
|
||||
.assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteManager)
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteConsumer);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@@ -262,10 +253,10 @@ public class AclTests extends CmisTest
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSEXCEL);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile)
|
||||
.and().addAcl(inviteUser, UserRole.SiteConsumer, AclPropagation.OBJECTONLY)
|
||||
.then().checkOut().assertThat().documentIsCheckedOut()
|
||||
.usingPWCDocument().applyAcl(inviteUser, UserRole.SiteManager, UserRole.SiteConsumer)
|
||||
.createFile(testFile)
|
||||
.and().addAcl(inviteUser, UserRole.SiteConsumer, AclPropagation.OBJECTONLY)
|
||||
.then().checkOut().assertThat().documentIsCheckedOut()
|
||||
.usingPWCDocument().applyAcl(inviteUser, UserRole.SiteManager, UserRole.SiteConsumer)
|
||||
.assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteManager);
|
||||
}
|
||||
|
||||
@@ -279,45 +270,45 @@ public class AclTests extends CmisTest
|
||||
.createFile(testFile)
|
||||
.and().addAcl(inviteUser, UserRole.SiteContributor, AclPropagation.OBJECTONLY)
|
||||
.when().removeAcl(inviteUser, UserRole.SiteContributor)
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Unauthorized user cannot remove acl")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void removeAclByUnauthorizedUser() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSEXCEL);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile)
|
||||
.and().addAcl(inviteUser, UserRole.SiteConsumer, AclPropagation.OBJECTONLY)
|
||||
.createFile(testFile)
|
||||
.and().addAcl(inviteUser, UserRole.SiteConsumer, AclPropagation.OBJECTONLY)
|
||||
.assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteConsumer)
|
||||
.when().authenticateUser(unauthorizedUser)
|
||||
.when().authenticateUser(unauthorizedUser)
|
||||
.removeAcl(inviteUser, UserRole.SiteConsumer);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Unauthorized user cannot add acl")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void addAclByUnauthorizedUser() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSEXCEL);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile)
|
||||
.then().authenticateUser(unauthorizedUser)
|
||||
.createFile(testFile)
|
||||
.then().authenticateUser(unauthorizedUser)
|
||||
.and().addAcl(inviteUser, UserRole.SiteConsumer, AclPropagation.OBJECTONLY);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Unauthorized user cannot apply acl")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void applyAclByUnauthorizedUser() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSEXCEL);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile)
|
||||
.and().addAcl(inviteUser, UserRole.SiteConsumer)
|
||||
.when().authenticateUser(unauthorizedUser)
|
||||
.createFile(testFile)
|
||||
.and().addAcl(inviteUser, UserRole.SiteConsumer)
|
||||
.when().authenticateUser(unauthorizedUser)
|
||||
.and().applyAcl(inviteUser, UserRole.SiteManager, UserRole.SiteConsumer);
|
||||
}
|
||||
|
||||
@@ -329,10 +320,10 @@ public class AclTests extends CmisTest
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile, VersioningState.CHECKEDOUT).and().assertThat().existsInRepo()
|
||||
.and().assertThat().documentIsCheckedOut()
|
||||
.then().usingResource(testFile)
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
.and().assertThat().documentIsCheckedOut()
|
||||
.then().usingResource(testFile)
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@@ -342,20 +333,20 @@ public class AclTests extends CmisTest
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Add Acl by user with collaborator role for document created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void collaboratorCannotAddAclForDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.addAcl(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
@@ -366,37 +357,37 @@ public class AclTests extends CmisTest
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.usingResource(testFile).refreshResource()
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Apply Acl by user with collaborator role for document created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void collaboratorCannotApplyAclForDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.applyAcl(inviteUser, UserRole.SiteCollaborator, UserRole.SiteContributor);
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.applyAcl(inviteUser, UserRole.SiteCollaborator, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Apply Acl by user with collaborator role for document created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void collaboratorCannotRemoveAclForDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.removeAcl(inviteUser, UserRole.SiteContributor);
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.removeAcl(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@@ -406,20 +397,20 @@ public class AclTests extends CmisTest
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Add Acl by user with contributor role for document created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void contributorCannotAddAclForDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.addAcl(inviteUser, UserRole.SiteCollaborator);
|
||||
}
|
||||
|
||||
@@ -430,48 +421,48 @@ public class AclTests extends CmisTest
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.usingResource(testFile).refreshResource()
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Apply Acl by user with contributor role for document created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void contributorCannotApplyAclForDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.applyAcl(inviteUser, UserRole.SiteCollaborator, UserRole.SiteContributor);
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.applyAcl(inviteUser, UserRole.SiteCollaborator, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Apply Acl by user with contributor role for document created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void contributorCannotRemoveAclForDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.removeAcl(inviteUser, UserRole.SiteContributor);
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.removeAcl(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Add Acl by user with consumer role for document created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotAddAclForDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.addAcl(inviteUser, UserRole.SiteCollaborator);
|
||||
}
|
||||
|
||||
@@ -482,92 +473,92 @@ public class AclTests extends CmisTest
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.usingResource(testFile).refreshResource()
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Apply Acl by user with consumer role for document created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotApplyAclForDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.applyAcl(inviteUser, UserRole.SiteCollaborator, UserRole.SiteContributor);
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.applyAcl(inviteUser, UserRole.SiteCollaborator, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Apply Acl by user with consumer role for document created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotRemoveAclForDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.removeAcl(inviteUser, UserRole.SiteContributor);
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.removeAcl(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Add Acl by non invited user in private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotAddAclInPrivateSite() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(privateSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.addAcl(inviteUser, UserRole.SiteCollaborator);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Get Acl by non invited user in private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotGetAclInPrivateSite() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(privateSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.usingResource(testFile).refreshResource()
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Apply Acl by non invited user in private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotApplyAclInPrivateSite() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(privateSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.applyAcl(inviteUser, UserRole.SiteCollaborator, UserRole.SiteContributor)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteCollaborator)
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.applyAcl(inviteUser, UserRole.SiteContributor, UserRole.SiteCollaborator);
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteCollaborator)
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.applyAcl(inviteUser, UserRole.SiteContributor, UserRole.SiteCollaborator);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Remove Acl by non invited user in private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotRemoveAclFromPrivateSite() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(privateSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.addAcl(inviteUser, UserRole.SiteContributor)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, UserRole.SiteContributor)
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.removeAcl(inviteUser, UserRole.SiteContributor);
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.removeAcl(inviteUser, UserRole.SiteContributor);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@@ -577,11 +568,11 @@ public class AclTests extends CmisTest
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().addAcl(inviteUser, PermissionMapping.CAN_UPDATE_PROPERTIES_OBJECT)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().addAcl(inviteUser, PermissionMapping.CAN_UPDATE_PROPERTIES_OBJECT)
|
||||
.assertThat().permissionIsSetForUser(inviteUser, EnumBasicPermissions.CMIS_WRITE.value())
|
||||
.then().addAcl(inviteUser, PermissionMapping.CAN_DELETE_OBJECT)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, EnumBasicPermissions.CMIS_ALL.value());
|
||||
.then().addAcl(inviteUser, PermissionMapping.CAN_DELETE_OBJECT)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, EnumBasicPermissions.CMIS_ALL.value());
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@@ -591,12 +582,12 @@ public class AclTests extends CmisTest
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().addAcl(inviteUser, PermissionMapping.CAN_DELETE_OBJECT)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().addAcl(inviteUser, PermissionMapping.CAN_DELETE_OBJECT)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, EnumBasicPermissions.CMIS_ALL.value())
|
||||
.then().applyAcl(inviteUser, PermissionMapping.CAN_UPDATE_PROPERTIES_OBJECT, PermissionMapping.CAN_DELETE_OBJECT)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, EnumBasicPermissions.CMIS_WRITE.value())
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, EnumBasicPermissions.CMIS_ALL.value());
|
||||
.then().applyAcl(inviteUser, PermissionMapping.CAN_UPDATE_PROPERTIES_OBJECT, PermissionMapping.CAN_DELETE_OBJECT)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, EnumBasicPermissions.CMIS_WRITE.value())
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, EnumBasicPermissions.CMIS_ALL.value());
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@@ -607,39 +598,39 @@ public class AclTests extends CmisTest
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().addAcl(inviteUser, PermissionMapping.CAN_UPDATE_PROPERTIES_OBJECT)
|
||||
.assertThat().permissionIsSetForUser(inviteUser, EnumBasicPermissions.CMIS_WRITE.value())
|
||||
.then().addAcl(inviteUser, PermissionMapping.CAN_DELETE_OBJECT)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, EnumBasicPermissions.CMIS_ALL.value())
|
||||
.then().removeAcl(inviteUser, PermissionMapping.CAN_DELETE_OBJECT)
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, EnumBasicPermissions.CMIS_ALL.value());
|
||||
.then().addAcl(inviteUser, PermissionMapping.CAN_UPDATE_PROPERTIES_OBJECT)
|
||||
.assertThat().permissionIsSetForUser(inviteUser, EnumBasicPermissions.CMIS_WRITE.value())
|
||||
.then().addAcl(inviteUser, PermissionMapping.CAN_DELETE_OBJECT)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, EnumBasicPermissions.CMIS_ALL.value())
|
||||
.then().removeAcl(inviteUser, PermissionMapping.CAN_DELETE_OBJECT)
|
||||
.and().assertThat().permissionIsNotSetForUser(inviteUser, EnumBasicPermissions.CMIS_ALL.value());
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Remove invalid Acl(that was not set) for valid document with PermissionMapping")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisConstraintException.class,
|
||||
@Test(groups = { "bug-atom-REPO-5383", TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions=CmisConstraintException.class,
|
||||
expectedExceptionsMessageRegExp="No matching ACE found to remove!*")
|
||||
public void siteManagerCannotRemoveInvalidAclWithPermissionMapping() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().addAcl(inviteUser, PermissionMapping.CAN_UPDATE_PROPERTIES_OBJECT)
|
||||
.assertThat().permissionIsSetForUser(inviteUser, EnumBasicPermissions.CMIS_WRITE.value())
|
||||
.then().removeAcl(inviteUser, PermissionMapping.CAN_CHECKIN_DOCUMENT);
|
||||
.assertThat().permissionIsSetForUser(inviteUser, EnumBasicPermissions.CMIS_WRITE.value())
|
||||
.then().removeAcl(inviteUser, PermissionMapping.CAN_CHECKIN_DOCUMENT);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Apply invalid Acl(that was not set) for valid document with PermissionMapping")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisConstraintException.class,
|
||||
@Test(groups = { "bug-atom-REPO-5383", TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions=CmisConstraintException.class,
|
||||
expectedExceptionsMessageRegExp="No matching ACE found to remove!*")
|
||||
public void siteManagerCannotApplyInvalidAclWithPermissionMapping() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().addAcl(inviteUser, PermissionMapping.CAN_DELETE_OBJECT)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.then().addAcl(inviteUser, PermissionMapping.CAN_DELETE_OBJECT)
|
||||
.and().assertThat().permissionIsSetForUser(inviteUser, EnumBasicPermissions.CMIS_ALL.value())
|
||||
.then().applyAcl(inviteUser, PermissionMapping.CAN_UPDATE_PROPERTIES_OBJECT, PermissionMapping.CAN_CREATE_FOLDER_FOLDER);
|
||||
.then().applyAcl(inviteUser, PermissionMapping.CAN_UPDATE_PROPERTIES_OBJECT, PermissionMapping.CAN_CREATE_FOLDER_FOLDER);
|
||||
}
|
||||
}
|
||||
|
@@ -8,6 +8,7 @@ import org.alfresco.utility.model.FolderModel;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
|
||||
@@ -35,7 +36,7 @@ public class AddObjectToFolderTests extends CmisTest
|
||||
testSite = dataSite.usingUser(testUser).createPublicRandomSite();
|
||||
destinationFolder = FolderModel.getRandomFolderModel();
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFolder(destinationFolder)
|
||||
.assertThat().existsInRepo();
|
||||
.assertThat().existsInRepo();
|
||||
usersWithRoles = dataUser.usingUser(testUser)
|
||||
.addUsersWithRolesToSite(testSite, UserRole.SiteContributor, UserRole.SiteCollaborator, UserRole.SiteConsumer);
|
||||
}
|
||||
@@ -47,10 +48,10 @@ public class AddObjectToFolderTests extends CmisTest
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.then().addDocumentToFolder(destinationFolder, true)
|
||||
.and().assertThat().existsInRepo()
|
||||
.and().assertThat().objectIdIs(sourceFile.getNodeRef());
|
||||
.and().assertThat().existsInRepo()
|
||||
.and().assertThat().objectIdIs(sourceFile.getNodeRef());
|
||||
}
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
@@ -62,7 +63,7 @@ public class AddObjectToFolderTests extends CmisTest
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
FolderModel folderToAdd = FolderModel.getRandomFolderModel();
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFolder(folderToAdd).assertThat().existsInRepo()
|
||||
.createFolder(folderToAdd).assertThat().existsInRepo()
|
||||
.then().addDocumentToFolder(folderToAdd, true);
|
||||
}
|
||||
|
||||
@@ -74,7 +75,7 @@ public class AddObjectToFolderTests extends CmisTest
|
||||
FileModel randomFile = FileModel.getRandomFileModel(FileType.HTML);
|
||||
randomFile.setCmisLocation("/" + randomFile.getName() + "/");
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.usingResource(randomFile)
|
||||
.usingResource(randomFile)
|
||||
.addDocumentToFolder(destinationFolder, true);
|
||||
}
|
||||
|
||||
@@ -87,7 +88,7 @@ public class AddObjectToFolderTests extends CmisTest
|
||||
FolderModel randomFolder = FolderModel.getRandomFolderModel();
|
||||
randomFolder.setCmisLocation("/" + randomFolder.getName() + "/");
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.then().addDocumentToFolder(randomFolder, true);
|
||||
}
|
||||
|
||||
@@ -98,39 +99,39 @@ public class AddObjectToFolderTests extends CmisTest
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.then().checkOut().and().assertThat().documentIsCheckedOut()
|
||||
.usingPWCDocument().addDocumentToFolder(destinationFolder, true)
|
||||
.and().assertThat().existsInRepo()
|
||||
.and().assertThat().documentIsCheckedOut();
|
||||
.and().assertThat().existsInRepo()
|
||||
.and().assertThat().documentIsCheckedOut();
|
||||
}
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to add document object to folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
public void siteManagerCanAddDocumentWithVersionsToFolderWithTrueAllVersions() throws Exception
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.then().update("first content").update("second content")
|
||||
.and().assertThat().documentHasVersion(1.2)
|
||||
.and().assertThat().documentHasVersion(1.2)
|
||||
.then().addDocumentToFolder(destinationFolder, true)
|
||||
.and().assertThat().existsInRepo()
|
||||
.and().assertThat().documentHasVersion(1.2);
|
||||
.and().assertThat().existsInRepo()
|
||||
.and().assertThat().documentHasVersion(1.2);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is not able to add document object to folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisInvalidArgumentException.class,
|
||||
@Test(groups = { "bug-atom-REPO-5383", TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS }, expectedExceptions=CmisInvalidArgumentException.class,
|
||||
expectedExceptionsMessageRegExp="Only allVersions=true supported!*")
|
||||
public void siteManagerCannotAddDocumentToFolderWithFalseAllVersions() throws Exception
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.then().update("update content")
|
||||
.and().assertThat().documentHasVersion(1.1)
|
||||
.and().assertThat().documentHasVersion(1.1)
|
||||
.then().addDocumentToFolder(destinationFolder, false);
|
||||
}
|
||||
|
||||
@@ -141,11 +142,11 @@ public class AddObjectToFolderTests extends CmisTest
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.usingSite(testSite)
|
||||
.usingSite(testSite)
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.then().addDocumentToFolder(destinationFolder, true)
|
||||
.and().assertThat().existsInRepo()
|
||||
.and().assertThat().objectIdIs(sourceFile.getNodeRef());
|
||||
.then().addDocumentToFolder(destinationFolder, true)
|
||||
.and().assertThat().existsInRepo()
|
||||
.and().assertThat().objectIdIs(sourceFile.getNodeRef());
|
||||
}
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
@@ -155,11 +156,11 @@ public class AddObjectToFolderTests extends CmisTest
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser)
|
||||
.usingSite(testSite)
|
||||
.usingSite(testSite)
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.then().addDocumentToFolder(destinationFolder, true)
|
||||
.and().assertThat().existsInRepo();
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.then().addDocumentToFolder(destinationFolder, true)
|
||||
.and().assertThat().existsInRepo();
|
||||
}
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
@@ -169,11 +170,11 @@ public class AddObjectToFolderTests extends CmisTest
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.usingSite(testSite)
|
||||
.usingSite(testSite)
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.then().addDocumentToFolder(destinationFolder, true)
|
||||
.and().assertThat().existsInRepo()
|
||||
.and().assertThat().objectIdIs(sourceFile.getNodeRef());
|
||||
.then().addDocumentToFolder(destinationFolder, true)
|
||||
.and().assertThat().existsInRepo()
|
||||
.and().assertThat().objectIdIs(sourceFile.getNodeRef());
|
||||
}
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
@@ -182,41 +183,38 @@ public class AddObjectToFolderTests extends CmisTest
|
||||
public void contributorCanAddFileToFolderCreatedByManager() throws Exception
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser)
|
||||
.usingSite(testSite)
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.then().addDocumentToFolder(destinationFolder, true)
|
||||
.and().assertThat().existsInRepo();
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.then().addDocumentToFolder(destinationFolder, true)
|
||||
.and().assertThat().existsInRepo();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site consumer is able to add document object created by manager to folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCanAddFileToFolderCreatedByManager() throws Exception
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser)
|
||||
.usingSite(testSite)
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.then().addDocumentToFolder(destinationFolder, true);
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.then().addDocumentToFolder(destinationFolder, true);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to delete parent folder with multiple children in private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotDeleteFolderTreeInPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(testUser).createPrivateRandomSite();
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
destinationFolder = FolderModel.getRandomFolderModel();
|
||||
cmisApi.authenticateUser(testUser)
|
||||
.usingSite(privateSite)
|
||||
cmisApi.authenticateUser(testUser).usingSite(privateSite)
|
||||
.createFolder(destinationFolder).assertThat().existsInRepo()
|
||||
.createFile(sourceFile).assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.then().addDocumentToFolder(destinationFolder, true);
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.then().addDocumentToFolder(destinationFolder, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -191,7 +191,7 @@ public class AllowableActionTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to get allowable actions from private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserOnPrivateSiteCannotGetAllowableActions() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -204,7 +204,7 @@ public class AllowableActionTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to get allowable actions from private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserOnModeratedSiteCannotGetAllowableActions() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
|
@@ -34,7 +34,7 @@ public class AppendContentStreamTests extends CmisTest
|
||||
usersWithRoles = dataUser.addUsersWithRolesToSite(publicSite, UserRole.SiteManager, UserRole.SiteContributor, UserRole.SiteCollaborator, UserRole.SiteConsumer);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to append content to a not empty file in DocumentLibrary with CMIS")
|
||||
public void siteManagerShouldAppendContentToNotEmptyFile() throws Exception
|
||||
@@ -46,7 +46,7 @@ public class AppendContentStreamTests extends CmisTest
|
||||
.assertThat().contentIs(initialContent + textToAppend);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisObjectNotFoundException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions=CmisObjectNotFoundException.class)
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify user is not able to append content to a non existent Document in DocumentLibrary with CMIS")
|
||||
public void userShouldNotAppendContentToNonexistentFile() throws Exception
|
||||
@@ -59,8 +59,8 @@ public class AppendContentStreamTests extends CmisTest
|
||||
.and().assertThat().doesNotExistInRepo()
|
||||
.then().update(textToAppend);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to append content to an empty file with version with CMIS")
|
||||
public void siteManagerCanAppendContentToEmptyFileWithVersion() throws Exception
|
||||
@@ -76,7 +76,7 @@ public class AppendContentStreamTests extends CmisTest
|
||||
.and().assertThat().contentIs(textToAppend);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to append content to an empty file with no version in DocumentLibrary with CMIS")
|
||||
public void siteManagerCanAppendContentToEmptyFileWithNoVersion() throws Exception
|
||||
@@ -88,8 +88,8 @@ public class AppendContentStreamTests extends CmisTest
|
||||
.then().update(textToAppend)
|
||||
.and().assertThat().contentIs(textToAppend);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to append content with last chunk parameter set to FALSE with CMIS")
|
||||
public void siteManagerCanAppendContentWithLastChunkSetToFalse() throws Exception
|
||||
@@ -102,7 +102,7 @@ public class AppendContentStreamTests extends CmisTest
|
||||
.and().assertThat().contentIs(initialContent + textToAppend);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify admin is able to append content to a file created by other user in DocumentLibrary with CMIS")
|
||||
public void adminShouldAppendContentToFileCreatedByOtherUser() throws Exception
|
||||
@@ -114,7 +114,7 @@ public class AppendContentStreamTests extends CmisTest
|
||||
.assertThat().contentIs(initialContent + textToAppend);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to append content to a file created by other user in DocumentLibrary with CMIS")
|
||||
public void siteManagerShouldAppendContentToFileCreatedByOtherUser() throws Exception
|
||||
@@ -126,7 +126,7 @@ public class AppendContentStreamTests extends CmisTest
|
||||
.assertThat().contentIs(initialContent + textToAppend);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site contributor is able to append content to a file created by self in DocumentLibrary with CMIS")
|
||||
public void contributorShouldAppendContentToFileCreatedBySelf() throws Exception
|
||||
@@ -139,7 +139,7 @@ public class AppendContentStreamTests extends CmisTest
|
||||
.assertThat().contentIs(initialContent + textToAppend);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site contributor is not able to append content to a file created by other user in DocumentLibrary with CMIS")
|
||||
public void contributorCannotAppendContentToFileCreatedByOtherUser() throws Exception
|
||||
@@ -151,7 +151,7 @@ public class AppendContentStreamTests extends CmisTest
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)).update(textToAppend);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site collaborator is able to append content to a file created by other user in DocumentLibrary with CMIS")
|
||||
public void collaboratorShouldAppendContentToFileCreatedByOtherUser() throws Exception
|
||||
@@ -163,7 +163,7 @@ public class AppendContentStreamTests extends CmisTest
|
||||
.assertThat().contentIs(initialContent + textToAppend);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site collaborator is able to append content to a file created by self in DocumentLibrary with CMIS")
|
||||
public void collaboratorShouldAppendContentToFileCreatedBySelf() throws Exception
|
||||
@@ -176,7 +176,7 @@ public class AppendContentStreamTests extends CmisTest
|
||||
.assertThat().contentIs(initialContent + textToAppend);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site consumer is not able to append content to a file with CMIS")
|
||||
public void consumerCannotAppendContentToFile() throws Exception
|
||||
@@ -188,7 +188,7 @@ public class AppendContentStreamTests extends CmisTest
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)).update(textToAppend);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUpdateConflictException.class, expectedExceptionsMessageRegExp = "^.*Cannot perform operation since the node.*is locked.$")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS }, expectedExceptions = CmisUpdateConflictException.class, expectedExceptionsMessageRegExp = "^.*Cannot perform operation since the node.*is locked.$")
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is not able to append content to a checked out file with CMIS")
|
||||
public void managerCannotAppendContentToCheckedOutFile() throws Exception
|
||||
@@ -200,7 +200,7 @@ public class AppendContentStreamTests extends CmisTest
|
||||
.when().update(textToAppend);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to append content to a PWC file with CMIS")
|
||||
public void managerCanAppendContentToPWCFile() throws Exception
|
||||
@@ -213,7 +213,7 @@ public class AppendContentStreamTests extends CmisTest
|
||||
.assertThat().contentIs(initialContent + textToAppend);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user is not able to append content to a file created in a private site with CMIS")
|
||||
public void unauthorizedUserCannotAppendContentToFileFromPrivateSite() throws Exception
|
||||
|
@@ -7,6 +7,7 @@ import org.alfresco.utility.model.FileType;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
|
||||
@@ -31,7 +32,7 @@ public class CancelCheckOutTests extends CmisTest
|
||||
usersWithRoles = dataUser.addUsersWithRolesToSite(testSite, UserRole.SiteContributor, UserRole.SiteCollaborator);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5391", TestGroup.SANITY, TestGroup.CMIS})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify cancel check out on a pwc")
|
||||
public void cancelCheckOutOnPWC() throws Exception
|
||||
@@ -50,7 +51,7 @@ public class CancelCheckOutTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify cancel check out on a document that isn't checked out")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisRuntimeException.class)
|
||||
@Test(groups = { "bug-atom-REPO-5383", TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisRuntimeException.class)
|
||||
public void cancelCheckOutOnADocumentThatIsntCheckedOut() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, fileContent);
|
||||
@@ -72,8 +73,8 @@ public class CancelCheckOutTests extends CmisTest
|
||||
.then().delete().and().assertThat().doesNotExistInRepo()
|
||||
.then().cancelCheckOut();
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisRuntimeException.class)
|
||||
|
||||
@Test(groups = { "bug-atom-REPO-5383", "bug-ws-REPO-5391", TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions=CmisRuntimeException.class)
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify cancel check out on a pwc twice")
|
||||
public void cancelCheckOutTwice() throws Exception
|
||||
@@ -83,7 +84,8 @@ public class CancelCheckOutTests extends CmisTest
|
||||
.createFile(testFile)
|
||||
.and().assertThat().existsInRepo()
|
||||
.and().checkOut()
|
||||
.and().assertThat().documentIsCheckedOut().assertThat().isPrivateWorkingCopy()
|
||||
.and().assertThat().documentIsCheckedOut()
|
||||
.assertThat().isPrivateWorkingCopy()
|
||||
.and().cancelCheckOut()
|
||||
.cancelCheckOut();
|
||||
}
|
||||
|
@@ -58,22 +58,19 @@ public class CheckInTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify check in document with minor version and with content")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5391", TestGroup.SANITY, TestGroup.CMIS})
|
||||
public void checkInDocumentWithMinorVersionAndWithContent() throws Exception
|
||||
{
|
||||
String newContent = "new minor content";
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, fileContent);
|
||||
cmisApi.authenticateUser(siteManager).usingSite(testSite).createFile(testFile)
|
||||
.and().assertThat().existsInRepo()
|
||||
.and().checkOut()
|
||||
.and().assertThat().documentIsCheckedOut()
|
||||
.assertThat().isPrivateWorkingCopy()
|
||||
.and().prepareDocumentForCheckIn()
|
||||
.withMinorVersion()
|
||||
.withContent(newContent)
|
||||
.checkIn()
|
||||
.and().assertThat().documentIsNotCheckedOut()
|
||||
.then().assertThat().documentHasVersion(1.1)
|
||||
cmisApi.authenticateUser(siteManager).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.checkOut().and().assertThat().documentIsCheckedOut()
|
||||
.assertThat().isPrivateWorkingCopy()
|
||||
.and().prepareDocumentForCheckIn()
|
||||
.withMinorVersion().withContent(newContent)
|
||||
.checkIn().and().assertThat().documentIsNotCheckedOut()
|
||||
.then().assertThat().documentHasVersion(1.1)
|
||||
.and().assertThat().contentIs(newContent);
|
||||
}
|
||||
|
||||
@@ -231,7 +228,7 @@ public class CheckInTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify check in document created with VersioningState checkedout")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5394", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void checkInDocumentWithProperties() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, fileContent);
|
||||
|
@@ -33,7 +33,7 @@ public class CheckOutTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify check out valid document")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5391", TestGroup.SANITY, TestGroup.CMIS})
|
||||
public void verifyCheckOutValidDocument() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, fileContent);
|
||||
@@ -94,7 +94,7 @@ public class CheckOutTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify that contributor user can NOT check out document created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = { CmisUnauthorizedException.class, CmisPermissionDeniedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void contributorCannotCheckOutDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, fileContent);
|
||||
@@ -107,7 +107,7 @@ public class CheckOutTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify that consumer user can NOT check out document")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = { CmisUnauthorizedException.class, CmisPermissionDeniedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotCheckOutDocument() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, fileContent);
|
||||
@@ -120,7 +120,7 @@ public class CheckOutTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify that unauthorized user can NOT check out document from private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = { CmisUnauthorizedException.class, CmisPermissionDeniedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotCheckOutDocumentFromPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(siteManager).createPrivateRandomSite();
|
||||
@@ -134,7 +134,7 @@ public class CheckOutTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify that unauthorized user can NOT check out document from moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = { CmisUnauthorizedException.class, CmisPermissionDeniedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotCheckOutDocumentModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingUser(siteManager).createModeratedRandomSite();
|
||||
|
@@ -7,6 +7,7 @@ import org.alfresco.utility.model.FolderModel;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
|
||||
@@ -48,7 +49,7 @@ public class CopyTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to copy file to an existent location in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM })
|
||||
public void siteManagerCopyFile() throws Exception
|
||||
{
|
||||
targetFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -100,10 +101,11 @@ public class CopyTests extends CmisTest
|
||||
.createFile(sourceFile).delete()
|
||||
.then().copyTo(targetFolder);
|
||||
}
|
||||
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non existing user is not able to copy file with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void nonExistentUserIsNotAbleToCopyFile() throws Exception
|
||||
{
|
||||
targetFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -114,10 +116,11 @@ public class CopyTests extends CmisTest
|
||||
cmisApi.authenticateUser(inexistentUser)
|
||||
.then().copyTo(targetFolder);
|
||||
}
|
||||
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non existing user is not able to copy folder with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void nonExistentUserIsNotAbleToCopyFolder() throws Exception
|
||||
{
|
||||
targetFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -130,11 +133,10 @@ public class CopyTests extends CmisTest
|
||||
cmisApi.authenticateUser(inexistentUser)
|
||||
.then().copyTo(targetFolder);
|
||||
}
|
||||
|
||||
// @Bug(id="ACE-5606")
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that checked out document can be copied with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-atom-REPO-5387", TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
public void checkedOutDocumentCanBeCopied() throws Exception
|
||||
{
|
||||
targetFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -196,7 +198,7 @@ public class CopyTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify copy PWC document object")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
@Test(groups = { "bug-atom-REPO-5387", TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
public void managerCopyPWCDocumentObject() throws Exception
|
||||
{
|
||||
sourceFile = dataContent.usingUser(testUser).usingSite(testSite).createContent(FileModel.getRandomFileModel(FileType.TEXT_PLAIN));
|
||||
@@ -252,7 +254,7 @@ public class CopyTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify consumer cannot copy Document")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotCopyDocument() throws Exception
|
||||
{
|
||||
sourceFile = dataContent.usingUser(testUser).usingSite(testSite).createContent(FileModel.getRandomFileModel(FileType.TEXT_PLAIN));
|
||||
@@ -263,7 +265,7 @@ public class CopyTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify consumer cannot copy Folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotCopyFolder() throws Exception
|
||||
{
|
||||
sourceFolder = dataContent.usingUser(testUser).usingSite(testSite).createFolder();
|
||||
@@ -274,7 +276,7 @@ public class CopyTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user cannot copy Document from private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotCopyDocumentFromPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(testUser).createPrivateRandomSite();
|
||||
@@ -285,7 +287,7 @@ public class CopyTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user cannot copy Folder from private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotCopyFolderFromPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(testUser).createPrivateRandomSite();
|
||||
@@ -296,7 +298,7 @@ public class CopyTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user cannot copy Document from moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotCopyDocumentFromModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingUser(testUser).createModeratedRandomSite();
|
||||
@@ -307,7 +309,7 @@ public class CopyTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user cannot copy Folder from moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotCopyFolderFromModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingUser(testUser).createModeratedRandomSite();
|
||||
|
@@ -10,6 +10,7 @@ import org.alfresco.utility.model.FolderModel;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
|
||||
@@ -46,7 +47,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to create file from source in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS })
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM })
|
||||
public void siteManagerShouldCreateDocumentFromSource() throws Exception
|
||||
{
|
||||
newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -54,6 +55,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
.refreshResource().then().assertThat().existsInRepo().and().assertThat().contentIs(sourceContent);
|
||||
}
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify inexistent user isn't able to create file from source in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisUnauthorizedException.class)
|
||||
@@ -66,8 +68,8 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.SANITY,
|
||||
description = "Verify unauthorized user isn't able to create file from source in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS }, expectedExceptions = { CmisPermissionDeniedException.class,
|
||||
CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM },
|
||||
expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserShouldNotCreateDocumentFromSource() throws Exception
|
||||
{
|
||||
UserModel unauthorizedUser = dataUser.createRandomTestUser();
|
||||
@@ -77,7 +79,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that manager user is not able to create document from source twice in the same location with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisContentAlreadyExistsException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM }, expectedExceptions = CmisContentAlreadyExistsException.class)
|
||||
public void siteManagerCannotCreateDocumentFromSourceTwice() throws Exception
|
||||
{
|
||||
newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -98,7 +100,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that manager user is not able to create document from source with invalid characters with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisConstraintException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM }, expectedExceptions = CmisConstraintException.class)
|
||||
public void siteManagerCannotCreateDocFromSourceWithInvalidChars() throws Exception
|
||||
{
|
||||
newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -130,7 +132,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that manager user is not able to create document from source with invalid base type id with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisContentAlreadyExistsException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM }, expectedExceptions = CmisContentAlreadyExistsException.class)
|
||||
public void siteManagerCannotCreateDocFromSourceWithInvalidBaseTypeId() throws Exception
|
||||
{
|
||||
newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -140,7 +142,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that manager user is not able to create an unnamed document from source with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM })
|
||||
public void siteManagerCannotCreateUnnamedDocFromSource() throws Exception
|
||||
{
|
||||
newFile = new FileModel("");
|
||||
@@ -154,7 +156,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to create file from source added by another user with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM })
|
||||
public void anotherSiteManagerShouldCreateDocumentFromSource() throws Exception
|
||||
{
|
||||
newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -164,12 +166,11 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
{
|
||||
cmisApi.refreshResource().then().assertThat().existsInRepo().and().assertThat().contentIs(sourceContent);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site contributor is able to create file from source added by another user with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM })
|
||||
public void contributorShouldCreateDocumentFromSource() throws Exception
|
||||
{
|
||||
newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -183,7 +184,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site collaborator is able to create file from source added by another user with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM })
|
||||
public void collaboratorShouldCreateDocumentFromSource() throws Exception
|
||||
{
|
||||
newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -198,8 +199,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site consumer is not able to create file from source with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = { CmisPermissionDeniedException.class,
|
||||
CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerShouldNotCreateDocumentFromSource() throws Exception
|
||||
{
|
||||
newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -209,7 +209,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to create file from source with versioning state set to Minor with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM })
|
||||
public void managerCreatesDocumentFromSourceWithVersionMinor() throws Exception
|
||||
{
|
||||
newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -226,7 +226,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to create file from source with versioning state set to None with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM })
|
||||
public void managerShouldCreateDocumentFromSourceWithVersionNone() throws Exception
|
||||
{
|
||||
newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -242,7 +242,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to create file from source with versioning state set to CHECKEDOUT with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM })
|
||||
public void managerCreatesDocumentFromSourceWithVersionCHECKEDOUT() throws Exception
|
||||
{
|
||||
newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -268,7 +268,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that manager is able to create document from a source that is checked out with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM })
|
||||
public void managerShouldCreateDocFromSourceThatIsCheckedOut() throws Exception
|
||||
{
|
||||
newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -281,7 +281,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that manager is able to create document from a source from his private site with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_ATOM })
|
||||
public void managerShouldCreateDocFromSourceFromHisPrivateSite() throws Exception
|
||||
{
|
||||
newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -293,8 +293,7 @@ public class CreateDocumentFromSourceTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that an user is not able to create document from a source from a private site with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = { CmisPermissionDeniedException.class,
|
||||
CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void userShouldNotCreateDocFromSourceFromPrivateSite() throws Exception
|
||||
{
|
||||
newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
|
@@ -7,23 +7,13 @@ import org.alfresco.cmis.exception.InvalidCmisObjectException;
|
||||
import org.alfresco.utility.constants.UserRole;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
import org.alfresco.utility.data.RandomData;
|
||||
import org.alfresco.utility.model.FileModel;
|
||||
import org.alfresco.utility.model.FileType;
|
||||
import org.alfresco.utility.model.FolderModel;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.model.*;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
|
||||
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisContentAlreadyExistsException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisPermissionDeniedException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.*;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -58,10 +48,11 @@ public class CreateDocumentTests extends CmisTest
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).and().assertThat().existsInRepo();
|
||||
}
|
||||
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify inexistent user isn't able to create files in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisUnauthorizedException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void inexistentUserShouldNotCreateDocument() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD);
|
||||
@@ -70,7 +61,7 @@ public class CreateDocumentTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify unauthorized user isn't able to create files in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserShouldNotCreateDocument() throws Exception
|
||||
{
|
||||
UserModel unauthorizedUser = dataUser.createRandomTestUser();
|
||||
@@ -144,9 +135,12 @@ public class CreateDocumentTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is not able to create document with cmis:folder base type id with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisConstraintException.class)
|
||||
@Test(groups = { "bug-atom-REPO-5389", TestGroup.REGRESSION, TestGroup.CMIS },
|
||||
expectedExceptions = CmisConstraintException.class,
|
||||
expectedExceptionsMessageRegExp = ".*Type is not a document type.*")
|
||||
public void siteManagerCannotCreateDocWithFolderTypeId() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile, BaseTypeId.CMIS_FOLDER.value(), VersioningState.MAJOR);
|
||||
}
|
||||
@@ -197,7 +191,7 @@ public class CreateDocumentTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to create file with CHECKEDOUT versioning state")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5391", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void siteManagerShouldCreateDocumentWithCheckedOutVersioningState() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -229,7 +223,7 @@ public class CreateDocumentTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site consumer is not able to create file")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerShouldNotCreateDocument() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -240,7 +234,7 @@ public class CreateDocumentTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to create file")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserShouldNotCreateDocumentInSite() throws Exception
|
||||
{
|
||||
UserModel outsider = dataUser.createRandomTestUser();
|
||||
@@ -250,10 +244,10 @@ public class CreateDocumentTests extends CmisTest
|
||||
.createFile(testFile);
|
||||
}
|
||||
|
||||
@Bug(id="REPO-4301")
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify disabled user is not able to create file in Shared folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void disabledUserShouldNotCreateDocument() throws Exception
|
||||
{
|
||||
UserModel disabled = dataUser.createRandomTestUser();
|
||||
@@ -266,7 +260,7 @@ public class CreateDocumentTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to create file in private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserShouldNotCreateDocumentInPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(testUser).createPrivateRandomSite();
|
||||
|
@@ -15,12 +15,7 @@ import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.PropertyIds;
|
||||
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisContentAlreadyExistsException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisPermissionDeniedException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.*;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@@ -62,10 +57,11 @@ public class CreateFolderTests extends CmisTest
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFolder(testFolder).and().assertThat().existsInRepo();
|
||||
}
|
||||
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify inexistent user can't create folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisUnauthorizedException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void inexistentUserShouldNotCreateFolder() throws Exception
|
||||
{
|
||||
testFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -105,7 +101,9 @@ public class CreateFolderTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is not able to create folder with cmis:document base type id with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisConstraintException.class)
|
||||
@Test(groups = { "bug-atom-REPO-5389", TestGroup.REGRESSION, TestGroup.CMIS},
|
||||
expectedExceptions = CmisConstraintException.class,
|
||||
expectedExceptionsMessageRegExp = ".*Type is not a folder type.*")
|
||||
public void siteManagerCannotCreateFolderWithDocumentTypeId() throws Exception
|
||||
{
|
||||
testFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -186,7 +184,7 @@ public class CreateFolderTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify consumer is not able to create folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotCreateFolder() throws Exception
|
||||
{
|
||||
testFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -194,10 +192,10 @@ public class CreateFolderTests extends CmisTest
|
||||
.createFolder(testFolder);
|
||||
}
|
||||
|
||||
@Bug(id="REPO-4301")
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify disabled user is not able to create folder in Shared location")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void disabledUserShouldNotCreateFolder() throws Exception
|
||||
{
|
||||
UserModel disabled = dataUser.createRandomTestUser();
|
||||
@@ -210,7 +208,7 @@ public class CreateFolderTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to create folder in private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserShouldNotCreateDocumentInPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(testUser).createPrivateRandomSite();
|
||||
|
@@ -44,7 +44,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to delete all document versions in DocumentLibrary with CMIS")
|
||||
@Test(groups = {TestGroup.SANITY, TestGroup.CMIS })
|
||||
@Test(groups = {TestGroup.SANITY, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
public void siteManagerDeletesAllDocumentVersions() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD);
|
||||
@@ -55,7 +55,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to delete only latest document version in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
public void siteManagerDeletesLatestDocumentVersion() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD);
|
||||
@@ -76,7 +76,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to delete PWC file version of a file with multiple versions with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
public void siteManagerCanDeletePWCFileWithDeleteAllVersionsTrue() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD);
|
||||
@@ -94,7 +94,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to delete PWC file version of a file with multiple versions set to false with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
public void siteManagerCanDeletePWCFileWithDeleteAllVersionsFalse() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD);
|
||||
@@ -112,8 +112,8 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is NOT able to delete file original multiple version which is checked out with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisConstraintException.class, expectedExceptionsMessageRegExp = "^Could not delete/cancel checkout on the original checked out document$")
|
||||
public void siteManagerCannotDeleteOriginalFileMultipleVersionWhenCheckedout() throws Exception
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS }, expectedExceptions = CmisConstraintException.class, expectedExceptionsMessageRegExp = "^Could not delete/cancel checkout on the original checked out document$")
|
||||
public void siteManagerCannotDeleteOriginalFileMultipleVersionWhenCheckedOut() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFile(testFile)
|
||||
@@ -128,7 +128,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user is NOT able to delete a checked out document")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotDeletePWCDocument() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -141,7 +141,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager can delete object Document")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
public void siteManagerCanDeleteDocument() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -163,7 +163,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify contributor can delete object Document created by self")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
public void contributorCanDeleteDocumentCreatedBySelf() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -174,7 +174,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify contributor cannot delete object Document created by site manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void contributorCannotDeleteDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -196,7 +196,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify contributor cannot delete object Folder created by site manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void contributorCannotDeleteFolderCreatedByManager() throws Exception
|
||||
{
|
||||
testFolder = new FolderModel(RandomData.getRandomName("Folder"));
|
||||
@@ -208,7 +208,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify collaborator can delete object Document created by self")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
public void collaboratorCanDeleteDocumentCreatedBySelf() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -219,7 +219,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify collaborator cannot delete object Document created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void collaboratorCannotDeleteDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -242,7 +242,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify collaborator cannot delete object Folder created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void collaboratorCannotDeleteFolderCreatedByManager() throws Exception
|
||||
{
|
||||
testFolder = new FolderModel(RandomData.getRandomName("Folder"));
|
||||
@@ -254,7 +254,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify consumer cannot delete object Document")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotDeleteDocumentCreated() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -266,7 +266,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify consumer cannot delete object Folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotDeleteFolderCreated() throws Exception
|
||||
{
|
||||
testFolder = new FolderModel(RandomData.getRandomName("Folder"));
|
||||
@@ -278,7 +278,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user cannot delete Document from private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotDeleteDocumentFromPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(testUser).createPrivateRandomSite();
|
||||
@@ -291,7 +291,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user cannot delete Folder from private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotDeleteFolderFromPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(testUser).createPrivateRandomSite();
|
||||
@@ -302,7 +302,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user cannot delete Document from moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotDeleteDocumentFromModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingUser(testUser).createModeratedRandomSite();
|
||||
@@ -313,7 +313,7 @@ public class DeleteAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user cannot delete Folder from moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotDeleteFolderFromModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingUser(testUser).createModeratedRandomSite();
|
||||
|
@@ -4,6 +4,7 @@ import org.alfresco.cmis.exception.InvalidCmisObjectException;
|
||||
import org.alfresco.utility.constants.UserRole;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
import org.alfresco.utility.model.*;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
|
||||
@@ -66,10 +67,11 @@ public class DeleteContentStreamTests extends CmisTest
|
||||
.and().assertThat().contentIs("")
|
||||
.then().deleteContent().and().assertThat().contentIs("");
|
||||
}
|
||||
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify nonexistent user is not able to delete content of a document with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisUnauthorizedException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void nonexistentUserCannotDeleteDocumentContent() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, content);
|
||||
@@ -151,7 +153,7 @@ public class DeleteContentStreamTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site contributor is not able to delete content of a not empty document created by other user in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void contributorCannotDeleteContentOfFileCreatedByOtherUser() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, content);
|
||||
@@ -175,7 +177,7 @@ public class DeleteContentStreamTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site consumer is not able to delete content of a not empty document in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotDeleteContentOfFileCreatedByOtherUser() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, content);
|
||||
@@ -210,7 +212,7 @@ public class DeleteContentStreamTests extends CmisTest
|
||||
.assertThat().contentIs("");
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user is not able to delete content of a file created in a private site with CMIS")
|
||||
public void unauthorizedUserCannotDeleteContentOfFileFromPrivateSite() throws Exception
|
||||
|
@@ -3,6 +3,7 @@ package org.alfresco.cmis;
|
||||
import org.alfresco.utility.constants.UserRole;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
import org.alfresco.utility.model.*;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException;
|
||||
@@ -69,7 +70,7 @@ public class DeleteTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to delete file with multiple versions with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
public void siteManagerCanDeleteFileWithVersions() throws Exception
|
||||
{
|
||||
testFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -165,7 +166,7 @@ public class DeleteTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site contributor is not able to delete file created by other user in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void contributorShouldNotDeleteFileCreatedByOtherUser() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD);
|
||||
@@ -178,7 +179,7 @@ public class DeleteTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site contributor is not able to delete folder created by other user in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void contributorShouldNotDeleteFolderCreatedByOtherUser() throws Exception
|
||||
{
|
||||
testFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -209,7 +210,7 @@ public class DeleteTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site collaborator is not able to delete file created by other user in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void collaboratorShouldNotDeleteFileCreatedByOtherUser() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD);
|
||||
@@ -223,7 +224,7 @@ public class DeleteTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site collaborator is not able to delete folder created by other user in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void collaboratorShouldNotDeleteFolderCreatedByOtherUser() throws Exception
|
||||
{
|
||||
testFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -237,7 +238,7 @@ public class DeleteTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site consumer is not able to delete file created by other user in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerShouldNotDeleteFile() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD);
|
||||
@@ -251,7 +252,7 @@ public class DeleteTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site consumer is not able to delete folder created by other user in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerShouldNotDeleteFolder() throws Exception
|
||||
{
|
||||
testFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -279,7 +280,7 @@ public class DeleteTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user is not able to delete file created inside a private site with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserShouldNotDeleteFile() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD);
|
||||
@@ -293,7 +294,7 @@ public class DeleteTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user is not able to delete folder created inside a private site with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserShouldNotDeleteFolder() throws Exception
|
||||
{
|
||||
testFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -307,7 +308,7 @@ public class DeleteTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user is not able to delete content created inside a private site with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotDeleteCheckedOutFile() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD);
|
||||
|
@@ -8,6 +8,7 @@ import org.alfresco.utility.model.FolderModel;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.enums.UnfileObject;
|
||||
@@ -75,10 +76,11 @@ public class DeleteTreeTests extends CmisTest
|
||||
.when().usingResource(parentTestFolder).deleteFolderTree().assertThat().doesNotExistInRepo()
|
||||
.deleteFolderTree();
|
||||
}
|
||||
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify inexistent user is NOT able to delete parent folder with multiple children in DocumentLibrary")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisUnauthorizedException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void inexistentUserCannotDeleteFolderTree() throws Exception
|
||||
{
|
||||
parentTestFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -131,8 +133,7 @@ public class DeleteTreeTests extends CmisTest
|
||||
.then().usingResource(childTestFolder).assertThat().doesNotExistInRepo()
|
||||
.usingResource(testFile).assertThat().doesNotExistInRepo();
|
||||
}
|
||||
|
||||
// @Bug(id="REPO-1108")
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is NOT able to delete parent folder with unfile parameter set to DELETESINGLEFILED, using checked out document")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
@@ -212,8 +213,7 @@ public class DeleteTreeTests extends CmisTest
|
||||
.then().usingResource(childTestFolder).assertThat().doesNotExistInRepo()
|
||||
.usingResource(testFile).assertThat().doesNotExistInRepo();
|
||||
}
|
||||
|
||||
// @Bug(id="REPO-1108")
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to delete parent folder with continueOnFailure parameter set to false")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@@ -253,49 +253,47 @@ public class DeleteTreeTests extends CmisTest
|
||||
.then().usingResource(childTestFolder).assertThat().doesNotExistInRepo()
|
||||
.usingResource(testFile).assertThat().doesNotExistInRepo();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site contributor is not able to delete parent folder with multiple children created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-atom-REPO-5390", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void contributorCannotDeleteFolderTreeCreatedByManager() throws Exception
|
||||
{
|
||||
parentTestFolder = FolderModel.getRandomFolderModel();
|
||||
childTestFolder = FolderModel.getRandomFolderModel();
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD, content);
|
||||
cmisApi.authenticateUser(testUser)
|
||||
.usingSite(testSite)
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFolder(parentTestFolder).and().assertThat().existsInRepo()
|
||||
.usingResource(parentTestFolder)
|
||||
.createFolder(childTestFolder).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.when().usingResource(parentTestFolder).refreshResource()
|
||||
.deleteFolderTree().and().assertThat().hasFailedDeletedObject(parentTestFolder.getNodeRef())
|
||||
.and().assertThat().existsInRepo()
|
||||
.then().usingResource(childTestFolder).assertThat().existsInRepo()
|
||||
.usingResource(testFile).assertThat().existsInRepo();
|
||||
.usingResource(parentTestFolder)
|
||||
.createFolder(childTestFolder).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo();
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.usingResource(parentTestFolder).refreshResource()
|
||||
.deleteFolderTree().and().assertThat().hasFailedDeletedObject(parentTestFolder.getNodeRef())
|
||||
.and().assertThat().existsInRepo()
|
||||
.usingResource(childTestFolder).assertThat().existsInRepo()
|
||||
.usingResource(testFile).assertThat().existsInRepo();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site collaborator is not able to delete parent folder with multiple children created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-atom-REPO-5390", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void collaboratorCannotDeleteFolderTreeCreatedByManager() throws Exception
|
||||
{
|
||||
parentTestFolder = FolderModel.getRandomFolderModel();
|
||||
childTestFolder = FolderModel.getRandomFolderModel();
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD, content);
|
||||
cmisApi.authenticateUser(testUser)
|
||||
.usingSite(testSite)
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFolder(parentTestFolder).and().assertThat().existsInRepo()
|
||||
.usingResource(parentTestFolder)
|
||||
.createFolder(childTestFolder).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.when().usingResource(parentTestFolder).refreshResource()
|
||||
.deleteFolderTree().and().assertThat().hasFailedDeletedObject(parentTestFolder.getNodeRef())
|
||||
.and().assertThat().existsInRepo()
|
||||
.then().usingResource(childTestFolder).assertThat().existsInRepo()
|
||||
.usingResource(testFile).assertThat().existsInRepo();
|
||||
.usingResource(parentTestFolder)
|
||||
.createFolder(childTestFolder).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo();
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.usingResource(parentTestFolder).refreshResource()
|
||||
.deleteFolderTree().and().assertThat().hasFailedDeletedObject(parentTestFolder.getNodeRef())
|
||||
.and().assertThat().existsInRepo()
|
||||
.usingResource(childTestFolder).assertThat().existsInRepo()
|
||||
.usingResource(testFile).assertThat().existsInRepo();
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@@ -318,32 +316,31 @@ public class DeleteTreeTests extends CmisTest
|
||||
.then().usingResource(childTestFolder).assertThat().doesNotExistInRepo()
|
||||
.usingResource(testFile).assertThat().doesNotExistInRepo();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site consumer is not able to delete parent folder with multiple children created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-atom-REPO-5390", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void consumerCannotDeleteFolderTreeCreatedByManager() throws Exception
|
||||
{
|
||||
parentTestFolder = FolderModel.getRandomFolderModel();
|
||||
childTestFolder = FolderModel.getRandomFolderModel();
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD, content);
|
||||
cmisApi.authenticateUser(testUser)
|
||||
.usingSite(testSite)
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFolder(parentTestFolder).and().assertThat().existsInRepo()
|
||||
.usingResource(parentTestFolder)
|
||||
.createFolder(childTestFolder).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.when().usingResource(parentTestFolder).refreshResource()
|
||||
.deleteFolderTree().and().assertThat().hasFailedDeletedObject(parentTestFolder.getNodeRef())
|
||||
.and().assertThat().existsInRepo()
|
||||
.then().usingResource(childTestFolder).assertThat().existsInRepo()
|
||||
.usingResource(testFile).assertThat().existsInRepo();
|
||||
.usingResource(parentTestFolder)
|
||||
.createFolder(childTestFolder).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo();
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.usingResource(parentTestFolder).refreshResource()
|
||||
.deleteFolderTree().and().assertThat().hasFailedDeletedObject(parentTestFolder.getNodeRef())
|
||||
.and().assertThat().existsInRepo()
|
||||
.usingResource(childTestFolder).assertThat().existsInRepo()
|
||||
.usingResource(testFile).assertThat().existsInRepo();
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to delete parent folder with multiple children in private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotDeleteFolderTreeInPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(testUser).createPrivateRandomSite();
|
||||
@@ -363,22 +360,22 @@ public class DeleteTreeTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify that only the parent folder is displayed in trash can after deleting it")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
public void checkTrashCanAfterDeletingParentFolder() throws Exception
|
||||
{
|
||||
parentTestFolder = FolderModel.getRandomFolderModel();
|
||||
childTestFolder = FolderModel.getRandomFolderModel();
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD, content);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFolder(parentTestFolder).and().assertThat().existsInRepo()
|
||||
.usingResource(parentTestFolder)
|
||||
.createFolder(parentTestFolder).and().assertThat().existsInRepo()
|
||||
.usingResource(parentTestFolder)
|
||||
.createFolder(childTestFolder).and().assertThat().existsInRepo()
|
||||
.createFile(testFile).and().assertThat().existsInRepo()
|
||||
.when().usingResource(parentTestFolder).refreshResource()
|
||||
.deleteFolderTree()
|
||||
.when().usingResource(parentTestFolder).refreshResource()
|
||||
.deleteFolderTree()
|
||||
.and().assertThat().doesNotExistInRepo()
|
||||
.then().usingResource(childTestFolder).assertThat().doesNotExistInRepo()
|
||||
.usingResource(testFile).assertThat().doesNotExistInRepo();
|
||||
.then().usingResource(childTestFolder).assertThat().doesNotExistInRepo()
|
||||
.usingResource(testFile).assertThat().doesNotExistInRepo();
|
||||
dataUser.assertTrashCanHasContent(parentTestFolder);
|
||||
dataUser.assertTrashCanDoesNotHaveContent(childTestFolder, testFile);
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ public class GetAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager can not get all versions for a document that was deleted")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisObjectNotFoundException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS }, expectedExceptions = CmisObjectNotFoundException.class)
|
||||
public void siteManagerShouldNotGetAllVersionsForADeletedDocument() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -160,7 +160,7 @@ public class GetAllVersionsTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user cannot get all versions for a document in private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotGetAllVersionsForDocumentFromPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(siteManager).createPrivateRandomSite();
|
||||
@@ -170,10 +170,10 @@ public class GetAllVersionsTests extends CmisTest
|
||||
.usingResource(testFile)
|
||||
.usingVersion().getAllDocumentVersions().assertHasVersions(1.0);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user cannot get all versions for a document in moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotGetAllVersionsForDocumentFromModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderated = dataSite.usingUser(siteManager).createPrivateRandomSite();
|
||||
|
@@ -144,7 +144,7 @@ public class GetCheckedOutDocumentsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to get checked out documents")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserShouldNotGetCheckedOutDocuments() throws Exception
|
||||
{
|
||||
FileModel doc = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
|
@@ -167,7 +167,7 @@ public class GetChildrenTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non site member cannot get children for a folder from a private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={ CmisPermissionDeniedException.class, CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberCannotGetChildrenFromValidFolderFromAPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingAdmin().createPrivateRandomSite();
|
||||
@@ -185,7 +185,7 @@ public class GetChildrenTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non site member cannot get children for a folder from a moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={ CmisPermissionDeniedException.class, CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberCannotGetChildrenFromValidFolderFromAModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingAdmin().createModeratedRandomSite();
|
||||
|
@@ -165,7 +165,7 @@ public class GetContentStreamTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify unauthorized is not able to get content of file created in a private site with CMIS")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS }, expectedExceptions = { CmisPermissionDeniedException.class, CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserShouldNotGetFileContent() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, content);
|
||||
|
@@ -164,7 +164,7 @@ public class GetDescendantsTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that non site member cannot get descendants for a folder from a private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={ CmisPermissionDeniedException.class, CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberCannotGetDescendantsAFolderFromAPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingAdmin().createPrivateRandomSite();
|
||||
@@ -179,7 +179,7 @@ public class GetDescendantsTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that non site member cannot get descendants for a folder from a moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={ CmisPermissionDeniedException.class, CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberCannotGetDescendantsAFolderFromAModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingAdmin().createModeratedRandomSite();
|
||||
|
@@ -42,7 +42,7 @@ public class GetExtensionTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Site manager can get extensions from a valid folder")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5394", TestGroup.SANITY, TestGroup.CMIS})
|
||||
public void siteManagerCanGetExtensionsForValidFolder() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFolder)
|
||||
@@ -51,7 +51,7 @@ public class GetExtensionTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Site manager can get extensions from a valid file")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5394", TestGroup.SANITY, TestGroup.CMIS})
|
||||
public void siteManagerCanGetExtensionsForValidFile() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFile)
|
||||
@@ -60,7 +60,7 @@ public class GetExtensionTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Site manager cannot get extensions from an invalid document - that was deleted")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisObjectNotFoundException.class})
|
||||
@Test(groups = { "bug-ws-REPO-5394", TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisObjectNotFoundException.class)
|
||||
public void siteManagerCannotGetExtensionsForInvalidDocument() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD);
|
||||
@@ -72,7 +72,7 @@ public class GetExtensionTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Site manager can get extensions from checkedout document")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5394", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void siteManagerCanGetExtensionsForCheckedOutDocument() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.MSWORD, documentContent);
|
||||
@@ -85,7 +85,7 @@ public class GetExtensionTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Site collaborator can get extensions")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5394", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void collaboratorCanGetExtensions() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)).usingResource(managerFolder)
|
||||
@@ -96,7 +96,7 @@ public class GetExtensionTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Site contributor can get extensions")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5394", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void contributorCanGetExtensions() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)).usingResource(managerFolder)
|
||||
@@ -107,7 +107,7 @@ public class GetExtensionTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Site consumer can get extensions")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5394", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void consumerCanGetExtensions() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)).usingResource(managerFolder)
|
||||
@@ -118,7 +118,7 @@ public class GetExtensionTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Non invited user can get extensions in public site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5394", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void nonInvitedUserCanGetExtensionsInPublicSite() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)).usingResource(managerFolder)
|
||||
@@ -129,7 +129,7 @@ public class GetExtensionTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Non invited user cannot get extensions in private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotGetExtensionsInPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(testUser).createPrivateRandomSite();
|
||||
@@ -138,10 +138,10 @@ public class GetExtensionTests extends CmisTest
|
||||
.createFile(privateDoc)
|
||||
.then().authenticateUser(nonInvitedUser).assertThat().hasAspectExtension(titledAspect);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Non invited user cannot get extensions in moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotGetExtensionsInModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingUser(testUser).createPrivateRandomSite();
|
||||
|
@@ -3,6 +3,7 @@ package org.alfresco.cmis;
|
||||
import org.alfresco.utility.constants.UserRole;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
import org.alfresco.utility.model.*;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
|
||||
@@ -121,7 +122,7 @@ public class GetFolderParentTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non site member for a private site is not able to get folder parent")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={ CmisPermissionDeniedException.class, CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberGetFolderParentFromPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingAdmin().createPrivateRandomSite();
|
||||
@@ -136,7 +137,7 @@ public class GetFolderParentTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non site member for a moderated site is not able to get folder parent")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={ CmisPermissionDeniedException.class, CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberGetFolderParentFromModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingAdmin().createModeratedRandomSite();
|
||||
|
@@ -3,6 +3,7 @@ package org.alfresco.cmis;
|
||||
import org.alfresco.utility.constants.UserRole;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
import org.alfresco.utility.model.*;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
|
||||
@@ -181,7 +182,7 @@ public class GetFolderTreeTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non site member of a private site cannot get folder tree for valid parent folder with at least 2 children folders")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={ CmisPermissionDeniedException.class, CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberCannotGetFolderTreeForAFolderFromAPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingAdmin().createPrivateRandomSite();
|
||||
@@ -196,7 +197,7 @@ public class GetFolderTreeTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non site member of a moderated site cannot get folder tree for valid parent folder with at least 2 children folders")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={ CmisPermissionDeniedException.class, CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberCannotGetFolderTreeForAFolderFromAModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingAdmin().createModeratedRandomSite();
|
||||
|
@@ -7,6 +7,7 @@ import org.alfresco.utility.model.FileType;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
|
||||
@@ -172,7 +173,7 @@ public class GetObjectOfLatestVersionTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to get last versions for document from private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotGetLastVersionsForDocumentCreatedByManagerInPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.createPrivateRandomSite();
|
||||
@@ -187,7 +188,7 @@ public class GetObjectOfLatestVersionTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to get last versions for document from moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotGetLastVersionsForDocumentCreatedByManagerInModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.createModeratedRandomSite();
|
||||
|
@@ -3,6 +3,7 @@ package org.alfresco.cmis;
|
||||
import org.alfresco.utility.constants.UserRole;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
import org.alfresco.utility.model.*;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
|
||||
@@ -135,7 +136,7 @@ public class GetObjectTypeTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Non site member is not able to verify CMIS document type for a document from a private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberCannotVerifyCmisObjectTypeForADocumentFromPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingAdmin().createPrivateRandomSite();
|
||||
@@ -149,7 +150,7 @@ public class GetObjectTypeTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Non site member is not able to verify CMIS document type for a folder from a private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberCannotVerifyCmisFolderTypeForAFolderFromPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingAdmin().createPrivateRandomSite();
|
||||
@@ -163,7 +164,7 @@ public class GetObjectTypeTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Non site member is not able to verify CMIS document type for a document from a moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberCannotVerifyCmisObjectTypeForADocumentFromModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingAdmin().createModeratedRandomSite();
|
||||
@@ -177,7 +178,7 @@ public class GetObjectTypeTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Non site member is not able to verify CMIS document type for a folder from a moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberCannotVerifyCmisObjectTypeForAFolderFromModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingAdmin().createModeratedRandomSite();
|
||||
|
@@ -8,6 +8,7 @@ import org.alfresco.utility.model.FolderModel;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
|
||||
@@ -207,7 +208,7 @@ public class GetParentsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non site member for a private site is not able to get folder parents with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberGetsFolderParentsFromPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingAdmin().createPrivateRandomSite();
|
||||
@@ -221,7 +222,7 @@ public class GetParentsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non site member for a private site is not able to get file parents with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberGetsFileParentsFromPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingAdmin().createPrivateRandomSite();
|
||||
@@ -235,7 +236,7 @@ public class GetParentsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non site member for a moderated site is not able to get folder parents with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberGetsFolderParentsFromModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingAdmin().createModeratedRandomSite();
|
||||
@@ -249,7 +250,7 @@ public class GetParentsTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non site member for a moderated site is not able to get file parents with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberGetsFileParentsFromModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingAdmin().createModeratedRandomSite();
|
||||
|
@@ -3,6 +3,7 @@ package org.alfresco.cmis;
|
||||
import org.alfresco.utility.constants.UserRole;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
import org.alfresco.utility.model.*;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
|
||||
@@ -38,7 +39,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.SANITY,
|
||||
description = "Verify secondaryObjectTypeIds property for valid document")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_CMIS_WS, TestGroup.SANITY, TestGroup.CMIS})
|
||||
public void verifySecondaryObjectTypeIdsPropertyForValidDocument() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFile(testFile)
|
||||
@@ -49,7 +50,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.SANITY,
|
||||
description = "Verify secondaryObjectTypeIds property for valid folder")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_CMIS_WS, TestGroup.SANITY, TestGroup.CMIS})
|
||||
public void verifySecondaryObjectTypeIdsPropertyForValidFolder() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFolder(testFolder)
|
||||
@@ -60,7 +61,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify secondaryObjectTypeIds property for inexistent folder (that was previously deleted)")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisObjectNotFoundException.class})
|
||||
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_CMIS_WS, TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisObjectNotFoundException.class})
|
||||
public void verifySecondaryObjectTypeIdsPropertyForInexistentFolder() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFolder(testFolder)
|
||||
@@ -73,7 +74,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify secondaryObjectTypeIds property for valid folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_CMIS_WS, TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void managerVerifiesSecondaryObjectTypeIdsPropertyForValidFolder() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFolder(testFolder);
|
||||
@@ -84,7 +85,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify secondaryObjectTypeIds property as site collaborator for valid document")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_CMIS_WS, TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void collaboratorVerifiesSecondaryObjectTypeIdsPropertyForValidDocumentCreatedBySelf() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)).usingSite(testSite).createFile(testFile)
|
||||
@@ -95,7 +96,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify secondaryObjectTypeIds property as site collaborator for valid folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_CMIS_WS, TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void collaboratorVerifiesSecondaryObjectTypeIdsPropertyForValidFolderCreatedBySelf() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)).usingSite(testSite).createFolder(testFolder)
|
||||
@@ -106,7 +107,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify secondaryObjectTypeIds property as site collaborator for valid document")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_CMIS_WS, TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void collaboratorVerifiesSecondaryObjectTypeIdsPropertyForValidDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFile(testFile)
|
||||
@@ -119,7 +120,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify secondaryObjectTypeIds property as site collaborator for valid folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_CMIS_WS, TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void collaboratorVerifiesSecondaryObjectTypeIdsPropertyForValidFolderCreatedByManager() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFolder(testFolder)
|
||||
@@ -132,7 +133,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify secondaryObjectTypeIds property as site contributor for valid document")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_CMIS_WS, TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void contributorVerifiesSecondaryObjectTypeIdsPropertyForValidDocumentCreatedBySelf() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)).usingSite(testSite).createFile(testFile)
|
||||
@@ -143,7 +144,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify secondaryObjectTypeIds property as site contributor for valid folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_CMIS_WS, TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void contributorVerifiesSecondaryObjectTypeIdsPropertyForValidFolderCreatedBySelf() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)).usingSite(testSite).createFolder(testFolder)
|
||||
@@ -154,7 +155,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify secondaryObjectTypeIds property as site contributor for valid document")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_CMIS_WS, TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void contributorVerifiesSecondaryObjectTypeIdsPropertyForValidDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFile(testFile)
|
||||
@@ -167,7 +168,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify secondaryObjectTypeIds property as site contributor for valid folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_CMIS_WS, TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void contributorVerifiesSecondaryObjectTypeIdsPropertyForValidFolderCreatedByManager() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFolder(testFolder)
|
||||
@@ -180,7 +181,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify secondaryObjectTypeIds property as site consumer for valid document")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_CMIS_WS, TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void consumerVerifiesSecondaryObjectTypeIdsPropertyForValidDocument() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFile(testFile)
|
||||
@@ -193,7 +194,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify secondaryObjectTypeIds property as site consumer for valid folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_CMIS_WS, TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void consumerVerifiesSecondaryObjectTypeIdsPropertyForValidFolder() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFolder(testFolder)
|
||||
@@ -206,7 +207,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that non site member cannot get secondaryObjectTypeIds property for a valid document from a private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberCannotGetSecondaryObjectTypeIdsForAValidDocumentFromAPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingAdmin().createPrivateRandomSite();
|
||||
@@ -221,7 +222,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that non site member cannot get secondaryObjectTypeIds property for a valid folder from a private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberCannotGetSecondaryObjectTypeIdsForAValidFolderFromAPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingAdmin().createPrivateRandomSite();
|
||||
@@ -236,7 +237,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that non site member cannot get secondaryObjectTypeIds property for a valid document from a moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberCannotGetSecondaryObjectTypeIdsForAValidDocumentFromAModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingAdmin().createModeratedRandomSite();
|
||||
@@ -251,7 +252,7 @@ public class GetPropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that non site member cannot get secondaryObjectTypeIds property for a valid folder from a moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonSiteMemberCannotGetSecondaryObjectTypeIdsForAValidFolderFromAModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingAdmin().createModeratedRandomSite();
|
||||
|
@@ -83,16 +83,11 @@ public class GetTypeChildrenTests extends CmisTest
|
||||
.withPropertyDefinitions()
|
||||
.hasChildren("F:pub:DeliveryChannel").propertyDefinitionIsNotEmpty();;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deleted user is not authorized to get type children for a valid type id
|
||||
* (verify that Map<String, PropertyDefinition<?>> is not empty)
|
||||
* @throws DataPreparationException
|
||||
*/
|
||||
@Bug(id="REPO-4301")
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify deleted user is not authorized to get type children for valid type id")
|
||||
@Test(groups = { TestGroup.CMIS, TestGroup.REGRESSION }, expectedExceptions = {CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.CMIS, TestGroup.REGRESSION }, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void getTypeChildrenWithWithDeletedUser() throws DataPreparationException
|
||||
{
|
||||
UserModel deletedUser = dataUser.createRandomTestUser();
|
||||
@@ -105,10 +100,10 @@ public class GetTypeChildrenTests extends CmisTest
|
||||
.usingObjectType(BaseTypeId.CMIS_FOLDER.value()).withPropertyDefinitions().doesNotHaveChildren("D:srft:facetField");
|
||||
}
|
||||
|
||||
@Bug(id="REPO-4301")
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify disabled user is not authorized to get type children for valid type id")
|
||||
@Test(groups = { TestGroup.CMIS, TestGroup.REGRESSION }, expectedExceptions = {CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.CMIS, TestGroup.REGRESSION }, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void getTypeChildrenWithWithDisabledUser() throws DataPreparationException
|
||||
{
|
||||
UserModel disabledUser = dataUser.createRandomTestUser();
|
||||
|
@@ -72,10 +72,10 @@ public class GetTypeDefinitionTests extends CmisTest
|
||||
.typeDefinitionIs(deletedFile);
|
||||
}
|
||||
|
||||
@Bug(id="REPO-4301")
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify user that was deleted cannot get Type Definition for a valid folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = { CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void deletedUserCannotGetTypeDefinitionForValidFolder() throws Exception
|
||||
{
|
||||
UserModel deletedUser = dataUser.createRandomTestUser();
|
||||
@@ -129,7 +129,7 @@ public class GetTypeDefinitionTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site Consumer is NOT able to get Type Definition for a valid folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = { CmisPermissionDeniedException.class, CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void siteConsumerCantGetTypeDefinitionForValidFolder() throws Exception
|
||||
{
|
||||
testFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -177,7 +177,7 @@ public class GetTypeDefinitionTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site Consumer is NOT able to get Type Definition for a valid file")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = { CmisPermissionDeniedException.class, CmisUnauthorizedException.class })
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void siteConsumerCantGetTypeDefinitionForValidFile() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.UNDEFINED);
|
||||
|
@@ -109,8 +109,8 @@ public class GetTypeDescendantsTests extends CmisTest
|
||||
.withoutPropertyDefinitions().hasDescendantType(1, "D:cm:dictionaryModel", "D:trx:transferLock");
|
||||
}
|
||||
|
||||
@Bug(id="REPO-4301")
|
||||
@Test(groups = { TestGroup.CMIS , TestGroup.REGRESSION }, expectedExceptions=CmisUnauthorizedException.class)
|
||||
@Bug(id = "REPO-5388")
|
||||
@Test(groups = { TestGroup.CMIS , TestGroup.REGRESSION }, expectedExceptions = CmisUnauthorizedException.class)
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify deleted user cannot get type descendantes for valid type id and includePropertyDefinitions = false and depth = 1")
|
||||
public void deletedUserCannotGetTypeDescendants() throws Exception
|
||||
@@ -123,8 +123,8 @@ public class GetTypeDescendantsTests extends CmisTest
|
||||
.withoutPropertyDefinitions().hasDescendantType(1, "D:cm:dictionaryModel", "D:trx:transferLock");
|
||||
}
|
||||
|
||||
@Bug(id="REPO-4301")
|
||||
@Test(groups = { TestGroup.CMIS , TestGroup.REGRESSION }, expectedExceptions=CmisUnauthorizedException.class)
|
||||
@Bug(id = "REPO-5388")
|
||||
@Test(groups = { TestGroup.CMIS , TestGroup.REGRESSION }, expectedExceptions = CmisUnauthorizedException.class)
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify disabled user cannot get type descendantes for valid type id and includePropertyDefinitions = false and depth = 1")
|
||||
public void disabledUserCannotGetTypeDescendants() throws Exception
|
||||
|
@@ -162,7 +162,7 @@ public class IsLatestMajorVersionTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user can verify is latest major version for document in private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotVerifyIsLatestMajorVersionInPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(managerUser).createPrivateRandomSite();
|
||||
@@ -175,7 +175,7 @@ public class IsLatestMajorVersionTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user can verify is latest major version for document in moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotVerifyIsLatestMajorVersionInModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingUser(managerUser).createPrivateRandomSite();
|
||||
|
@@ -7,6 +7,7 @@ import org.alfresco.utility.model.FileType;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
|
||||
@@ -37,20 +38,20 @@ public class IsPrivateWorkingCopyTests extends CmisTest
|
||||
.createFile(checkedOutDoc).and().checkOut()
|
||||
.createFile(simpleDoc);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to verify if checked out document is private working copy")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5391", TestGroup.SANITY, TestGroup.CMIS})
|
||||
public void siteManagerCanVerifyIsPrivateWorkingCopy() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(managerUser).usingResource(checkedOutDoc)
|
||||
.assertThat().isPrivateWorkingCopy()
|
||||
.then().usingResource(simpleDoc).assertThat().isNotPrivateWorkingCopy();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to verify if pwc document is private working copy")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5391", TestGroup.SANITY, TestGroup.CMIS})
|
||||
public void siteManagerCanVerifyIsPrivateWorkingCopyOnPwc() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(managerUser).usingResource(checkedOutDoc)
|
||||
@@ -69,10 +70,10 @@ public class IsPrivateWorkingCopyTests extends CmisTest
|
||||
.then().delete().and().assertThat().doesNotExistInRepo()
|
||||
.assertThat().isPrivateWorkingCopy();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site collaborator is able to verify if checked out document is private working copy")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5391", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void collaboratorCanVerifyIsPrivateWorkingCopy() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
@@ -80,10 +81,10 @@ public class IsPrivateWorkingCopyTests extends CmisTest
|
||||
.assertThat().isPrivateWorkingCopy()
|
||||
.then().usingResource(simpleDoc).assertThat().isNotPrivateWorkingCopy();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site contributor is able to verify if checked out document is private working copy")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5391", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void contributorCanVerifyIsPrivateWorkingCopy() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
@@ -91,10 +92,10 @@ public class IsPrivateWorkingCopyTests extends CmisTest
|
||||
.assertThat().isPrivateWorkingCopy()
|
||||
.then().usingResource(simpleDoc).assertThat().isNotPrivateWorkingCopy();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site consumer is able to verify if checked out document is private working copy")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5391", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void consumerCanVerifyIsPrivateWorkingCopy() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
@@ -102,10 +103,10 @@ public class IsPrivateWorkingCopyTests extends CmisTest
|
||||
.assertThat().isPrivateWorkingCopy()
|
||||
.then().usingResource(simpleDoc).assertThat().isNotPrivateWorkingCopy();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is able to verify if checked out document is private working copy in public site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5391", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void nonInvitedUserCanVerifyIsPrivateWorkingCopyInPublicSite() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
@@ -113,10 +114,10 @@ public class IsPrivateWorkingCopyTests extends CmisTest
|
||||
.assertThat().isPrivateWorkingCopy()
|
||||
.then().usingResource(simpleDoc).assertThat().isNotPrivateWorkingCopy();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to verify if checked out document is private working copy in private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotVerifyIsPrivateWorkingCopyInPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(managerUser).createPrivateRandomSite();
|
||||
@@ -126,10 +127,10 @@ public class IsPrivateWorkingCopyTests extends CmisTest
|
||||
.then().authenticateUser(nonInvitedUser)
|
||||
.assertThat().isPrivateWorkingCopy();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to verify if checked out document is private working copy in moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotVerifyIsPrivateWorkingCopyInModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingUser(managerUser).createPrivateRandomSite();
|
||||
@@ -139,10 +140,10 @@ public class IsPrivateWorkingCopyTests extends CmisTest
|
||||
.then().authenticateUser(nonInvitedUser)
|
||||
.assertThat().isPrivateWorkingCopy();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to verify if document created with CHECKEDOUT versioning state is private working copy")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5391", TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
public void verifyIsPrivateWorkingCopyForDocumentWithCheckedOutVersioningState() throws Exception
|
||||
{
|
||||
FileModel checkedDoc = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, documentContent);
|
||||
|
@@ -7,6 +7,7 @@ import org.alfresco.utility.model.FolderModel;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
|
||||
@@ -88,7 +89,7 @@ public class MoveTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to move file that has multiple versions with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
public void siteManagerShouldMoveFileWithMultipleVersions() throws Exception
|
||||
{
|
||||
targetFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -124,10 +125,11 @@ public class MoveTests extends CmisTest
|
||||
.moveTo(targetFolder).and().assertThat().existsInRepo()
|
||||
.and().assertThat().hasChildren(sourceFile, subFolder);
|
||||
}
|
||||
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify inexistent is not able to move file with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisUnauthorizedException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void inexistentUserCannotMoveFile() throws Exception
|
||||
{
|
||||
targetFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -177,10 +179,10 @@ public class MoveTests extends CmisTest
|
||||
FileModel checkedOutDoc = cmisApi.getFiles().get(0);
|
||||
cmisApi.usingResource(checkedOutDoc).assertThat().documentIsCheckedOut();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify unauthorized user is no able to move a file")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotMovesFile() throws Exception
|
||||
{
|
||||
targetFolder = FolderModel.getRandomFolderModel();
|
||||
@@ -217,7 +219,7 @@ public class MoveTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify contributor cannot move Document created by Manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void contributorCannotMoveDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
sourceFile = dataContent.usingUser(siteManager).usingSite(publicSite).createContent(FileModel.getRandomFileModel(FileType.TEXT_PLAIN));
|
||||
@@ -239,7 +241,7 @@ public class MoveTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify contributor cannot move Folder created by Manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void contributorCannotMoveFolderCreatedByManager() throws Exception
|
||||
{
|
||||
sourceFolder = dataContent.usingUser(siteManager).usingSite(publicSite).createFolder();
|
||||
@@ -261,7 +263,7 @@ public class MoveTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify collaborator cannot move Document created by Manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void collaboratorCannotMoveDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
sourceFile = dataContent.usingUser(siteManager).usingSite(publicSite).createContent(FileModel.getRandomFileModel(FileType.TEXT_PLAIN));
|
||||
@@ -283,7 +285,7 @@ public class MoveTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify collaborator cannot move Folder created by Manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void collaboratorCannotMoveFolderCreatedByManager() throws Exception
|
||||
{
|
||||
sourceFolder = dataContent.usingUser(siteManager).usingSite(publicSite).createFolder();
|
||||
@@ -293,7 +295,7 @@ public class MoveTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify consumer cannot move Document")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotMoveDocument() throws Exception
|
||||
{
|
||||
sourceFile = dataContent.usingUser(siteManager).usingSite(publicSite).createContent(FileModel.getRandomFileModel(FileType.TEXT_PLAIN));
|
||||
@@ -303,7 +305,7 @@ public class MoveTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify consumer cannot move Folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotMoveFolder() throws Exception
|
||||
{
|
||||
sourceFolder = dataContent.usingUser(siteManager).usingSite(publicSite).createFolder();
|
||||
@@ -313,7 +315,7 @@ public class MoveTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user cannot move Document from private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotMoveDocumentFromPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(siteManager).createPrivateRandomSite();
|
||||
@@ -324,7 +326,7 @@ public class MoveTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user cannot move Folder from private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotMoveFolderFromPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(siteManager).createPrivateRandomSite();
|
||||
@@ -335,7 +337,7 @@ public class MoveTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user cannot move Document from moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotMoveDocumentFromModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingUser(siteManager).createModeratedRandomSite();
|
||||
@@ -346,7 +348,7 @@ public class MoveTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user cannot move Folder from moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisUnauthorizedException.class, CmisPermissionDeniedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotMoveFolderFromModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingUser(siteManager).createModeratedRandomSite();
|
||||
|
@@ -80,9 +80,10 @@ public class RelationshipTests extends CmisTest
|
||||
.and().assertThat().objectHasRelationshipWith(targetFile);
|
||||
}
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify that inexistent user is not able to create relationship between documents with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisUnauthorizedException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void inexistentUserCannotCreateRelationship() throws Exception
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -95,10 +96,10 @@ public class RelationshipTests extends CmisTest
|
||||
.and().assertThat().objectHasRelationshipWith(targetFile);
|
||||
}
|
||||
|
||||
@Bug(id="REPO-4301")
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify that user that was deleted is not able to create relationship between documents with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisUnauthorizedException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void deletedUserCannotCreateRelationship() throws Exception
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -163,7 +164,7 @@ public class RelationshipTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify contributor is not able to create relationship between a source object and a target object in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS},expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void contributorCannotCreateRelationship() throws Exception
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -193,7 +194,7 @@ public class RelationshipTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify consumer is not able to create relationship between a source object and a target object in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS},expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotCreateRelationship() throws Exception
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -208,7 +209,7 @@ public class RelationshipTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify unauthorized user is not able to create relationship between a source object and a target object from a private site with CMIS")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotCreateRelationship() throws Exception
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
@@ -219,10 +220,10 @@ public class RelationshipTests extends CmisTest
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager))
|
||||
.usingResource(sourceFile).createRelationshipWith(targetFile);
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify unauthorized user is not able to get relationship between a source object and a target object from a private site with CMIS")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotGetRelationship() throws Exception
|
||||
{
|
||||
sourceFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
|
@@ -7,6 +7,7 @@ import org.alfresco.utility.model.FolderModel;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
|
||||
@@ -120,7 +121,7 @@ public class RemoveObjectFromFolderTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.SANITY,
|
||||
description = "Verify unauthorized user is not able to remove a document from folder")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserShouldNotRemoveFileToFolder() throws Exception
|
||||
{
|
||||
UserModel unauthorizedUser = dataUser.createRandomTestUser();
|
||||
@@ -150,7 +151,7 @@ public class RemoveObjectFromFolderTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify contributor can remove document from folder created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void contributorCannotRemoveDocumentFromFolderCreatedByManager() throws Exception
|
||||
{
|
||||
parentFolder = dataContent.usingUser(siteManager).usingSite(publicSite).createFolder();
|
||||
@@ -181,7 +182,7 @@ public class RemoveObjectFromFolderTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify collaborator can remove document from folder created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void collaboratorCannotRemoveDocumentFromFolderCreatedByManager() throws Exception
|
||||
{
|
||||
parentFolder = dataContent.usingUser(siteManager).usingSite(publicSite).createFolder();
|
||||
@@ -196,7 +197,7 @@ public class RemoveObjectFromFolderTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify consumer cannot remove document from folder")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotRemoveDocumentFromFolder() throws Exception
|
||||
{
|
||||
parentFolder = dataContent.usingUser(siteManager).usingSite(publicSite).createFolder();
|
||||
@@ -211,7 +212,7 @@ public class RemoveObjectFromFolderTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify remove document from folder by user that is outside a private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotRemoveDocumentFromPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(siteManager).createPrivateRandomSite();
|
||||
@@ -227,7 +228,7 @@ public class RemoveObjectFromFolderTests extends CmisTest
|
||||
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify remove document from folder by user that is outside a moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void unauthorizedUserCannotRemoveDocumentFromModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingUser(siteManager).createModeratedRandomSite();
|
||||
|
@@ -8,6 +8,7 @@ import org.alfresco.utility.model.FolderModel;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException;
|
||||
@@ -196,7 +197,7 @@ public class RenameTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to rename document with multiple versions")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
public void siteManagerCanRenameDocumentWithMultipleVersions() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, documentContent);
|
||||
@@ -258,10 +259,10 @@ public class RenameTests extends CmisTest
|
||||
.rename(testFile.getName() + prefix).assertThat().existsInRepo()
|
||||
.when().usingResource(testFile).assertThat().doesNotExistInRepo();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site contributor is not able to rename document created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void siteContributorCannotRenameDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, documentContent);
|
||||
@@ -283,10 +284,10 @@ public class RenameTests extends CmisTest
|
||||
.rename(testFile.getName() + prefix).assertThat().existsInRepo()
|
||||
.when().usingResource(testFile).assertThat().doesNotExistInRepo();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site consumer is not able to rename document created by manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void siteConsumerCannotRenameDocumentCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, documentContent);
|
||||
@@ -295,10 +296,10 @@ public class RenameTests extends CmisTest
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.rename(testFile.getName() + prefix).assertThat().existsInRepo();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to rename document in public site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void siteConsumerCannotRenameDocumentInPublicSite() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, documentContent);
|
||||
@@ -307,10 +308,10 @@ public class RenameTests extends CmisTest
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.rename(testFile.getName() + prefix).assertThat().existsInRepo();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to rename document in private site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotRenameDocumentInPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(managerUser).createPrivateRandomSite();
|
||||
@@ -320,10 +321,10 @@ public class RenameTests extends CmisTest
|
||||
.then().authenticateUser(nonInvitedUser)
|
||||
.rename(testFile.getName() + prefix).assertThat().existsInRepo();
|
||||
}
|
||||
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to rename document in moderated site")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotRenameDocumentInModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel moderatedSite = dataSite.usingUser(managerUser).createModeratedRandomSite();
|
||||
|
@@ -8,6 +8,7 @@ import org.alfresco.utility.model.FileType;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
|
||||
@@ -17,7 +18,7 @@ import org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedExceptio
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.RENDITIONS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.RENDITIONS })
|
||||
public class RenditionTests extends CmisTest
|
||||
{
|
||||
private SiteModel testSite;
|
||||
@@ -132,7 +133,7 @@ public class RenditionTests extends CmisTest
|
||||
.assertThat().thumbnailRenditionIsAvailable());
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.RENDITIONS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.RENDITIONS}, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user cannot get renditions in private site")
|
||||
public void nonInvitedUserCannotGetRenditionsInPrivateSite() throws Exception
|
||||
@@ -147,7 +148,7 @@ public class RenditionTests extends CmisTest
|
||||
.assertThat().thumbnailRenditionIsAvailable();
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.RENDITIONS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.RENDITIONS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user cannot get renditions in moderated site")
|
||||
public void nonInvitedUserCannotGetRenditionsInModeratedSite() throws Exception
|
||||
|
@@ -35,6 +35,7 @@ public class RepositoryInfoTests extends CmisTest
|
||||
Assert.assertNotNull(cmisApi.authenticateUser(testUser).getSession());
|
||||
}
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.SANITY, description = "Verify that valid user with invalid password cannot get repositories")
|
||||
public void unauthorizedUserCannotGetRepositories() throws Exception
|
||||
@@ -81,7 +82,8 @@ public class RepositoryInfoTests extends CmisTest
|
||||
Assert.assertEquals(aclCapabilities.getSupportedPermissions().value(), "both", "Verify acl capabilities: getSupportedPermissions");
|
||||
Assert.assertEquals(aclCapabilities.getAclPropagation().value(), "propagate", "Verify acl capabilities: getAclPropagation");
|
||||
}
|
||||
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION, description = "Verify that invalid user cannot get repositories")
|
||||
public void invalidUserCannotGetRepositories() throws Exception
|
||||
@@ -105,8 +107,8 @@ public class RepositoryInfoTests extends CmisTest
|
||||
String wrongBindingType = BindingType.BROWSER.value() + "w";
|
||||
cmisApi.authUserUsingBrowserUrlAndBindingType(testUser, cmisApi.cmisProperties.envProperty().getFullServerUrl() + cmisApi.cmisProperties.getBasePath(), wrongBindingType).getRepositoryInfo();
|
||||
}
|
||||
|
||||
@Bug(id="REPO-4301")
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
@TestRail(section = { "cmis-api" }, executionType = ExecutionType.REGRESSION, description = "Verify that disabled user cannot get repositories")
|
||||
public void disabledUserCannotGetRepositories() throws Exception
|
||||
|
@@ -10,6 +10,7 @@ import org.alfresco.utility.model.FolderModel;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
|
||||
@@ -39,249 +40,237 @@ public class SecondaryTypesTests extends CmisTest
|
||||
usersWithRoles = dataUser.usingUser(testUser)
|
||||
.addUsersWithRolesToSite(testSite, UserRole.SiteContributor, UserRole.SiteCollaborator, UserRole.SiteConsumer);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(managerFile)
|
||||
.createFolder(managerFolder);
|
||||
.createFile(managerFile)
|
||||
.createFolder(managerFolder);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to get secondary types for Document")
|
||||
public void userCanGetSecondaryTypesForDocument() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFile)
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to get secondary types for Folder")
|
||||
public void userCanGetSecondaryTypesForFolder() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFolder)
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = {CmisObjectNotFoundException.class})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS },
|
||||
expectedExceptions = { CmisObjectNotFoundException.class })
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is NOT able to get secondary types for Folder")
|
||||
public void userCannotGetSecondaryTypesForInvalidObject() throws Exception
|
||||
{
|
||||
FolderModel folder = FolderModel.getRandomFolderModel();
|
||||
folder.setCmisLocation("/" + folder.getName() + "/");
|
||||
cmisApi.authenticateUser(testUser)
|
||||
.usingResource(folder)
|
||||
.usingResource(folder)
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is NOT able to get invalid secondary type for Folder")
|
||||
public void invalidSecondaryTypeIsNotAvailableForFolder() throws Exception
|
||||
{
|
||||
FolderModel folder = FolderModel.getRandomFolderModel();
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFolder(folder).and().assertThat().existsInRepo()
|
||||
.and().assertThat().secondaryTypeIsNotAvailable(titledAspect + "-fake");
|
||||
.createFolder(folder)
|
||||
.and().assertThat().existsInRepo()
|
||||
.and().assertThat().secondaryTypeIsNotAvailable(titledAspect + "-fake");
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site collaborator is able to get secondary types")
|
||||
public void collaboratorCanGetSecondaryTypesForContent() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.usingResource(managerFolder)
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().usingResource(managerFile)
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
.usingResource(managerFolder).assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().usingResource(managerFile).assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site contributor is able to get secondary types")
|
||||
public void contributorCanGetSecondaryTypesForContent() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.usingResource(managerFolder)
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().usingResource(managerFile)
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
.usingResource(managerFolder).assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().usingResource(managerFile).assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site consumer is able to get secondary types")
|
||||
public void consumerCanGetSecondaryTypesForContent() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.usingResource(managerFolder)
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().usingResource(managerFile)
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
.usingResource(managerFolder).assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().usingResource(managerFile).assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is able to get secondary types in public site")
|
||||
public void nonInvitedUserCanGetSecondaryTypesForContentInPublicSite() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(nonInvitedUser)
|
||||
.usingResource(managerFolder)
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().usingResource(managerFile)
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
.usingResource(managerFolder).assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().usingResource(managerFile).assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS },
|
||||
expectedExceptions = { CmisPermissionDeniedException.class, CmisUnauthorizedException.class })
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to get secondary types in private site")
|
||||
public void nonInvitedUserCannotGetSecondaryTypesForContentInPrivateSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(testUser).createPrivateRandomSite();
|
||||
FileModel privateDoc = FileModel.getRandomFileModel(FileType.MSPOWERPOINT2007);
|
||||
cmisApi.authenticateUser(testUser).usingSite(privateSite)
|
||||
.createFile(privateDoc)
|
||||
.authenticateUser(nonInvitedUser)
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
cmisApi.authenticateUser(testUser).usingSite(privateSite).createFile(privateDoc)
|
||||
.authenticateUser(nonInvitedUser).assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS },
|
||||
expectedExceptions = { CmisPermissionDeniedException.class, CmisUnauthorizedException.class })
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to get secondary types in moderated site")
|
||||
public void nonInvitedUserCannotGetSecondaryTypesInModeratedSite() throws Exception
|
||||
{
|
||||
SiteModel privateSite = dataSite.usingUser(testUser).createModeratedRandomSite();
|
||||
FileModel privateDoc = FileModel.getRandomFileModel(FileType.MSPOWERPOINT2007);
|
||||
cmisApi.authenticateUser(testUser).usingSite(privateSite)
|
||||
.createFile(privateDoc)
|
||||
.authenticateUser(nonInvitedUser)
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
cmisApi.authenticateUser(testUser).usingSite(privateSite).createFile(privateDoc)
|
||||
.authenticateUser(nonInvitedUser).assertThat().secondaryTypeIsAvailable(titledAspect);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to add secondary types for Document")
|
||||
public void managerCanAddSecondaryTypesForDocument() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFile)
|
||||
.addSecondaryTypes("P:cm:dublincore")
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFile).addSecondaryTypes("P:cm:dublincore")
|
||||
.assertThat().secondaryTypeIsAvailable("P:cm:dublincore")
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().updateProperty("cm:subject", "TAS Subject")
|
||||
.updateProperty("cm:rights", "TAS Rights")
|
||||
.updateProperty("cm:publisher", "TAS Team")
|
||||
.then().assertThat().objectHasProperty("cm:subject", "TAS Subject")
|
||||
.assertThat().objectHasProperty("cm:rights", "TAS Rights")
|
||||
.assertThat().objectHasProperty("cm:publisher", "TAS Team");
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().updateProperty("cm:subject", "TAS Subject")
|
||||
.updateProperty("cm:rights", "TAS Rights")
|
||||
.updateProperty("cm:publisher", "TAS Team")
|
||||
.then().assertThat().objectHasProperty("cm:subject", "TAS Subject")
|
||||
.assertThat().objectHasProperty("cm:rights", "TAS Rights")
|
||||
.assertThat().objectHasProperty("cm:publisher", "TAS Team");
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.SANITY,
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to add secondary types for folder")
|
||||
public void managerCanAddSecondaryTypesForFolder() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFolder)
|
||||
.addSecondaryTypes("P:cm:geographic")
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFolder).addSecondaryTypes("P:cm:geographic")
|
||||
.assertThat().secondaryTypeIsAvailable("P:cm:geographic")
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().updateProperty("cm:longitude", 455.21)
|
||||
.updateProperty("cm:latitude", 101.32)
|
||||
.then().assertThat().objectHasProperty("cm:longitude", 455.21)
|
||||
.assertThat().objectHasProperty("cm:latitude", 101.32);
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().updateProperty("cm:longitude", 455.21)
|
||||
.updateProperty("cm:latitude", 101.32)
|
||||
.then().assertThat().objectHasProperty("cm:longitude", 455.21)
|
||||
.assertThat().objectHasProperty("cm:latitude", 101.32);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisObjectNotFoundException.class,
|
||||
expectedExceptionsMessageRegExp="Type 'P:cm:fakeAspect' is unknown!*")
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS },
|
||||
expectedExceptions = CmisObjectNotFoundException.class,
|
||||
expectedExceptionsMessageRegExp = "Type 'P:cm:fakeAspect' is unknown!*")
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is not able to add fake secondary type")
|
||||
public void managerCannotAddInexistentSecondaryType() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFolder)
|
||||
.addSecondaryTypes("P:cm:fakeAspect");
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFolder).addSecondaryTypes("P:cm:fakeAspect");
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to add twice same secondary type")
|
||||
public void managerCanAddTwiceSameSecondaryType() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFile)
|
||||
.addSecondaryTypes("P:cm:dublincore")
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFile).addSecondaryTypes("P:cm:dublincore")
|
||||
.assertThat().secondaryTypeIsAvailable("P:cm:dublincore")
|
||||
.then().addSecondaryTypes("P:cm:dublincore")
|
||||
.assertThat().secondaryTypeIsAvailable("P:cm:dublincore");
|
||||
.then().addSecondaryTypes("P:cm:dublincore")
|
||||
.assertThat().secondaryTypeIsAvailable("P:cm:dublincore");
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site collaborator is able to add secondary types for document created by manager")
|
||||
public void collaboratorCanAddAspectForDocument() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)).usingResource(managerFile)
|
||||
.addSecondaryTypes("P:audio:audio")
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.usingResource(managerFile).addSecondaryTypes("P:audio:audio")
|
||||
.assertThat().secondaryTypeIsAvailable("P:audio:audio")
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().updateProperty("audio:channelType", "TAS")
|
||||
.updateProperty("audio:trackNumber", 9)
|
||||
.updateProperty("audio:sampleType", "TAS Sample")
|
||||
.then().assertThat().objectHasProperty("audio:channelType", "TAS")
|
||||
.assertThat().objectHasProperty("audio:trackNumber", 9)
|
||||
.assertThat().objectHasProperty("audio:sampleType", "TAS Sample");
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().updateProperty("audio:channelType", "TAS")
|
||||
.updateProperty("audio:trackNumber", 9)
|
||||
.updateProperty("audio:sampleType", "TAS Sample")
|
||||
.then().assertThat().objectHasProperty("audio:channelType", "TAS")
|
||||
.assertThat().objectHasProperty("audio:trackNumber", 9)
|
||||
.assertThat().objectHasProperty("audio:sampleType", "TAS Sample");
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site contributor is able to add secondary types for document created by manager")
|
||||
public void contributorCanAddAspectForDocument() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)).usingResource(managerFile)
|
||||
.addSecondaryTypes("P:dp:restrictable")
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.usingResource(managerFile).addSecondaryTypes("P:dp:restrictable")
|
||||
.assertThat().secondaryTypeIsAvailable("P:dp:restrictable")
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().updateProperty("dp:offlineExpiresAfter", 2)
|
||||
.and().assertThat().objectHasProperty("dp:offlineExpiresAfter", 2);
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().updateProperty("dp:offlineExpiresAfter", 2)
|
||||
.and().assertThat().objectHasProperty("dp:offlineExpiresAfter", 2);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site contributor is able to add secondary types for document created by manager")
|
||||
public void consumerCanAddAspectForDocument() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)).usingResource(managerFile)
|
||||
.addSecondaryTypes("P:dp:restrictable")
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.usingResource(managerFile).addSecondaryTypes("P:dp:restrictable")
|
||||
.assertThat().secondaryTypeIsAvailable("P:dp:restrictable")
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().updateProperty("dp:offlineExpiresAfter", 2)
|
||||
.and().assertThat().objectHasProperty("dp:offlineExpiresAfter", 2);
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().updateProperty("dp:offlineExpiresAfter", 2)
|
||||
.and().assertThat().objectHasProperty("dp:offlineExpiresAfter", 2);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to add twice same secondary type")
|
||||
public void managerCanAddDateProperty() throws Exception
|
||||
{
|
||||
Date today = new Date();
|
||||
Date tomorow = new Date();
|
||||
tomorow = DateUtils.addDays(tomorow, 1);
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFile)
|
||||
.addSecondaryTypes("P:cm:effectivity")
|
||||
Date tomorrow = new Date();
|
||||
tomorrow = DateUtils.addDays(tomorrow, 1);
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFile).addSecondaryTypes("P:cm:effectivity")
|
||||
.assertThat().secondaryTypeIsAvailable("P:cm:effectivity")
|
||||
.then().updateProperty("cm:to", today)
|
||||
.updateProperty("cm:from", tomorow)
|
||||
.and().assertThat().objectHasProperty("cm:to", today)
|
||||
.assertThat().objectHasProperty("cm:from", tomorow);
|
||||
.then().updateProperty("cm:to", today)
|
||||
.updateProperty("cm:from", tomorrow)
|
||||
.and().assertThat().objectHasProperty("cm:to", today)
|
||||
.assertThat().objectHasProperty("cm:from", tomorrow);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=IllegalArgumentException.class,
|
||||
expectedExceptionsMessageRegExp="Property 'cm:fake-prop' is not valid for this type or one of the secondary types!*")
|
||||
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS },
|
||||
expectedExceptions = IllegalArgumentException.class,
|
||||
expectedExceptionsMessageRegExp = "Property 'cm:fake-prop' is not valid for this type or one of the secondary types!*")
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is not able to update aspect with fake property")
|
||||
public void managerCannotUpdateFakePropertyFromAspect() throws Exception
|
||||
{
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFile)
|
||||
.addSecondaryTypes("P:cm:dublincore")
|
||||
cmisApi.authenticateUser(testUser).usingResource(managerFile).addSecondaryTypes("P:cm:dublincore")
|
||||
.assertThat().secondaryTypeIsAvailable("P:cm:dublincore")
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().updateProperty("cm:fake-prop", "fake-prop");
|
||||
.assertThat().secondaryTypeIsAvailable(titledAspect)
|
||||
.then().updateProperty("cm:fake-prop", "fake-prop");
|
||||
}
|
||||
}
|
||||
|
@@ -34,10 +34,10 @@ public class SetContentTests extends CmisTest
|
||||
publicSite = dataSite.usingUser(siteManager).createPublicRandomSite();
|
||||
usersWithRoles = dataUser.addUsersWithRolesToSite(publicSite, UserRole.SiteManager, UserRole.SiteContributor, UserRole.SiteCollaborator, UserRole.SiteConsumer);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to set content to a valid document in DocumentLibrary with CMIS")
|
||||
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to set content to a valid document in DocumentLibrary with CMIS")
|
||||
public void siteManagerSetFileContentForFileCreatedBySelf() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, "first content");
|
||||
@@ -59,21 +59,20 @@ public class SetContentTests extends CmisTest
|
||||
.usingSite(publicSite)
|
||||
.createFolder(testFolder).setContent(someContent);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisUnauthorizedException.class)
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions = CmisUnauthorizedException.class)
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that inexistent user is not able to set content to a document with CMIS")
|
||||
public void inexistentUserCannotSetFileContent() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(siteManager).usingSite(publicSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.and().assertThat().contentLengthIs(0)
|
||||
.then().authenticateUser(UserModel.getRandomUserModel())
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.then().authenticateUser(UserModel.getRandomUserModel())
|
||||
.setContent(someContent);
|
||||
}
|
||||
|
||||
@Bug(id="ACE-5614")
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION , TestGroup.CMIS})
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to set content to a document with no content with overwrite parameter set to false with CMIS")
|
||||
@@ -81,9 +80,10 @@ public class SetContentTests extends CmisTest
|
||||
{
|
||||
FileModel newFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(siteManager).usingSite(publicSite)
|
||||
.createFile(newFile).assertThat().existsInRepo()
|
||||
.and().assertThat().contentLengthIs(0)
|
||||
.then().setContent(someContent, false).and()
|
||||
.createFile(newFile).assertThat().existsInRepo()
|
||||
.deleteContent(true)
|
||||
.then().assertThat().contentLengthIs(-1)
|
||||
.then().setContent(someContent, false)
|
||||
.and().assertThat().contentIs(someContent);
|
||||
}
|
||||
|
||||
@@ -98,8 +98,8 @@ public class SetContentTests extends CmisTest
|
||||
.and().assertThat().contentIs(someContent)
|
||||
.then().setContent(secondContent, false);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user is not able to set content to a document")
|
||||
public void unauthorizedUserCannotSetContent() throws Exception
|
||||
@@ -140,7 +140,7 @@ public class SetContentTests extends CmisTest
|
||||
.and().assertThat().contentLengthIs(12);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site contributor is not able to set content to a document created by other user with CMIS")
|
||||
public void contributorCannotSetFileContentForFileCreatedByOtherUser() throws Exception
|
||||
@@ -193,7 +193,7 @@ public class SetContentTests extends CmisTest
|
||||
.and().assertThat().contentLengthIs(12);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site consumer is not able to set file content with CMIS")
|
||||
public void consumerCannotSetFileContent() throws Exception
|
||||
@@ -231,7 +231,7 @@ public class SetContentTests extends CmisTest
|
||||
.and().assertThat().contentLengthIs(12);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
@TestRail(section = {"cmis-api" }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify unauthorized user is not able to set content to a document from a private site")
|
||||
public void unauthorizedUserCannotSetContentToPrivateSiteDoc() throws Exception
|
||||
|
@@ -44,73 +44,77 @@ public class UpdatePropertiesTests extends CmisTest
|
||||
testSite = dataSite.usingUser(testUser).createPublicRandomSite();
|
||||
dataContent.deployContentModel("shared-resources/model/tas-model.xml");
|
||||
usersWithRoles = dataUser.usingUser(testUser)
|
||||
.addUsersWithRolesToSite(testSite, UserRole.SiteContributor, UserRole.SiteCollaborator, UserRole.SiteConsumer);
|
||||
.addUsersWithRolesToSite(testSite, UserRole.SiteContributor, UserRole.SiteCollaborator, UserRole.SiteConsumer);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to update properties to a valid document in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS })
|
||||
public void siteManagerUpdatesFileProperties() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.then().updateProperty("cmis:name", propertyNameValue)
|
||||
.and().assertThat().contentPropertyHasValue("cmis:name", propertyNameValue)
|
||||
.and().assertThat().contentPropertyHasValue("cmis:name", propertyNameValue)
|
||||
.then().updateProperty("cmis:description", "some description")
|
||||
.and().assertThat().contentPropertyHasValue("cmis:description", "some description");
|
||||
.and().assertThat().contentPropertyHasValue("cmis:description", "some description");
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.SANITY,
|
||||
description = "Verify site manager is able to update properties to a valid folder in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.SANITY, TestGroup.CMIS })
|
||||
public void siteManagerUpdatesFolderProperties() throws Exception
|
||||
{
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
testFolder = FolderModel.getRandomFolderModel();
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFolder(testFolder).assertThat().existsInRepo()
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFolder(testFolder).assertThat().existsInRepo()
|
||||
.then().updateProperty("cmis:name", propertyNameValue)
|
||||
.and().assertThat().contentPropertyHasValue("cmis:name", propertyNameValue)
|
||||
.and().assertThat().contentPropertyHasValue("cmis:name", propertyNameValue)
|
||||
.then().updateProperty("cmis:description", "some description")
|
||||
.and().assertThat().contentPropertyHasValue("cmis:description", "some description");
|
||||
.and().assertThat().contentPropertyHasValue("cmis:description", "some description");
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify if exception is thrown when user tries to update properties to a non existent document in DocumentLibrary with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisObjectNotFoundException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS },
|
||||
expectedExceptions = CmisObjectNotFoundException.class)
|
||||
public void siteManagerUpdatesNoneExistentFileProperties() throws Exception
|
||||
{
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFile(testFile).assertThat().existsInRepo()
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.then().delete().and().assertThat().doesNotExistInRepo()
|
||||
.then().updateProperty("cmis:name", propertyNameValue);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is not able to update properties with invalid property with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=IllegalArgumentException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS },
|
||||
expectedExceptions = IllegalArgumentException.class)
|
||||
public void siteManagerCannotUpdateFileWithInvalidProperty() throws Exception
|
||||
{
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.then().updateProperty("cmis:fakeProp", propertyNameValue);
|
||||
}
|
||||
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify that deleted user is not able to update properties with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisUnauthorizedException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void deletedUserCannotUpdateFileProperties() throws Exception
|
||||
{
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
UserModel toBeDeleted = dataUser.createRandomTestUser();
|
||||
FolderModel shared = FolderModel.getSharedFolderModel();
|
||||
cmisApi.authenticateUser(toBeDeleted)
|
||||
.usingResource(shared)
|
||||
cmisApi.authenticateUser(toBeDeleted).usingResource(shared)
|
||||
.createFile(testFile).and().assertThat().existsInRepo();
|
||||
dataUser.deleteUser(toBeDeleted);
|
||||
// Token will still be valid right after this call
|
||||
@@ -122,15 +126,13 @@ public class UpdatePropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is not able to update name property while document is checked out with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
public void siteManagerCannotUpdatePWCDocumentName() throws Exception
|
||||
{
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.then().checkOut()
|
||||
.and().assertThat().documentIsCheckedOut()
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFile(testFile).assertThat().existsInRepo()
|
||||
.then().checkOut().and().assertThat().documentIsCheckedOut()
|
||||
.usingPWCDocument().updateProperty("cmis:name", testFile.getName() + "-edit")
|
||||
.cancelCheckOut()
|
||||
.then().usingResource(testFile)
|
||||
@@ -139,87 +141,89 @@ public class UpdatePropertiesTests extends CmisTest
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to update the title and description while document is checked out with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { "bug-ws-REPO-5394", TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
public void siteManagerCanUpdateCheckOutDocTitleAndDescription() throws Exception
|
||||
{
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.then().checkOut().and().assertThat().documentIsCheckedOut()
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.then().checkOut().and().assertThat().documentIsCheckedOut()
|
||||
.then().usingPWCDocument()
|
||||
.updateProperty("cmis:description", propertyNameValue)
|
||||
.updateProperty("cm:title", propertyNameValue)
|
||||
.updateProperty("cmis:description", propertyNameValue)
|
||||
.updateProperty("cm:title", propertyNameValue)
|
||||
.and().assertThat().contentPropertyHasValue("cmis:description", propertyNameValue)
|
||||
.assertThat().contentPropertyHasValue("cm:title", propertyNameValue);
|
||||
.assertThat().contentPropertyHasValue("cm:title", propertyNameValue);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to update the title and description for document with version is checked out with CMIS")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS, TestGroup.NOT_SUPPORTED_ON_CMIS_WS })
|
||||
public void siteManagerCanUpdateDocumentWithVersion() throws Exception
|
||||
{
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite).createFile(testFile).assertThat().existsInRepo()
|
||||
.then().update("first content").update("second content")
|
||||
.updateProperty("cmis:description", propertyNameValue)
|
||||
.updateProperty("cm:title", propertyNameValue)
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.then().update("first content")
|
||||
.then().update("second content")
|
||||
.updateProperty("cmis:description", propertyNameValue)
|
||||
.updateProperty("cm:title", propertyNameValue)
|
||||
.and().assertThat().contentPropertyHasValue("cmis:description", propertyNameValue)
|
||||
.assertThat().contentPropertyHasValue("cm:title", propertyNameValue);
|
||||
.assertThat().contentPropertyHasValue("cm:title", propertyNameValue);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is not able to update document name with invalid symbols")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisConstraintException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisConstraintException.class)
|
||||
public void siteManagerCannotUpdateDocNameInvalidSymbols() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
propertyNameValue = "/.:?|\\`\\";
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.then().updateProperty("cmis:name", propertyNameValue);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is not able to update folder name with invalid symbols")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisConstraintException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisConstraintException.class)
|
||||
public void siteManagerCannotUpdateFolderNameInvalidSymbols() throws Exception
|
||||
{
|
||||
testFolder = FolderModel.getRandomFolderModel();
|
||||
propertyNameValue = "/.:?|\\`\\";
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFolder(testFolder).assertThat().existsInRepo()
|
||||
.createFolder(testFolder).assertThat().existsInRepo()
|
||||
.then().updateProperty("cmis:name", propertyNameValue);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is not able to update document name with empty value")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisRuntimeException.class,
|
||||
expectedExceptionsMessageRegExp="Local name cannot be null or empty.")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisRuntimeException.class,
|
||||
expectedExceptionsMessageRegExp = "Local name cannot be null or empty.")
|
||||
public void siteManagerCannotUpdateDocNameEmptyValue() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.then().updateProperty("cmis:name", "");
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is not able to update folder name with empty value")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisRuntimeException.class,
|
||||
expectedExceptionsMessageRegExp="Local name cannot be null or empty.")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisRuntimeException.class,
|
||||
expectedExceptionsMessageRegExp = "Local name cannot be null or empty.")
|
||||
public void siteManagerCannotUpdateFolderNameEmptyValue() throws Exception
|
||||
{
|
||||
testFolder = FolderModel.getRandomFolderModel();
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFolder(testFolder).assertThat().existsInRepo()
|
||||
.createFolder(testFolder).assertThat().existsInRepo()
|
||||
.then().updateProperty("cmis:name", "");
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to update Integer and Long types with max values")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
public void siteManagerCanUpdateIntAndLongTypesWithMaxValue() throws Exception
|
||||
{
|
||||
FileModel customFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, "custom content");
|
||||
@@ -228,17 +232,17 @@ public class UpdatePropertiesTests extends CmisTest
|
||||
properties.put(PropertyIds.NAME, customFile.getName());
|
||||
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(customFile, properties, VersioningState.MAJOR).assertThat().existsInRepo()
|
||||
.createFile(customFile, properties, VersioningState.MAJOR).assertThat().existsInRepo()
|
||||
.then().updateProperty("tas:IntPropertyC", Integer.MAX_VALUE)
|
||||
.and().assertThat().contentPropertyHasValue("tas:IntPropertyC", String.valueOf(Integer.MAX_VALUE))
|
||||
.and().assertThat().contentPropertyHasValue("tas:IntPropertyC", String.valueOf(Integer.MAX_VALUE))
|
||||
.then().updateProperty("tas:LongPropertyC", Long.MAX_VALUE)
|
||||
.and().assertThat().contentPropertyHasValue("tas:LongPropertyC", String.valueOf(Long.MAX_VALUE));
|
||||
.and().assertThat().contentPropertyHasValue("tas:LongPropertyC", String.valueOf(Long.MAX_VALUE));
|
||||
cmisApi.usingResource(customFile).delete().assertThat().doesNotExistInRepo();
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site manager is able to update Integer and Long types with min values")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
public void siteManagerCanUpdateIntAndLongTypesWithMinValue() throws Exception
|
||||
{
|
||||
FileModel customFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, "custom content");
|
||||
@@ -247,115 +251,115 @@ public class UpdatePropertiesTests extends CmisTest
|
||||
properties.put(PropertyIds.NAME, customFile.getName());
|
||||
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(customFile, properties, VersioningState.MAJOR).assertThat().existsInRepo()
|
||||
.createFile(customFile, properties, VersioningState.MAJOR).assertThat().existsInRepo()
|
||||
.then().updateProperty("tas:IntPropertyC", Integer.MIN_VALUE)
|
||||
.and().assertThat().contentPropertyHasValue("tas:IntPropertyC", String.valueOf(Integer.MIN_VALUE))
|
||||
.and().assertThat().contentPropertyHasValue("tas:IntPropertyC", String.valueOf(Integer.MIN_VALUE))
|
||||
.then().updateProperty("tas:LongPropertyC", Long.MIN_VALUE)
|
||||
.and().assertThat().contentPropertyHasValue("tas:LongPropertyC", String.valueOf(Long.MIN_VALUE));
|
||||
.and().assertThat().contentPropertyHasValue("tas:LongPropertyC", String.valueOf(Long.MIN_VALUE));
|
||||
cmisApi.usingResource(customFile).delete().assertThat().doesNotExistInRepo();
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site collaborator is able to update properties to a valid document created by himself")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
public void collaboratorCanUpdateHisOwnFileProperties() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)).usingSite(testSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.usingSite(testSite).createFile(testFile).assertThat().existsInRepo()
|
||||
.then().updateProperty("cmis:name", propertyNameValue)
|
||||
.and().assertThat().contentPropertyHasValue("cmis:name", propertyNameValue)
|
||||
.and().assertThat().contentPropertyHasValue("cmis:name", propertyNameValue)
|
||||
.then().updateProperty("cmis:description", "some description")
|
||||
.and().assertThat().contentPropertyHasValue("cmis:description", "some description");
|
||||
.and().assertThat().contentPropertyHasValue("cmis:description", "some description");
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site collaborator is able to update properties to a valid document created by site manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
public void collaboratorCanUpdateFilePropertiesCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.and().updateProperty("cmis:name", propertyNameValue)
|
||||
.and().assertThat().contentPropertyHasValue("cmis:name", propertyNameValue)
|
||||
.and().updateProperty("cmis:name", propertyNameValue)
|
||||
.and().assertThat().contentPropertyHasValue("cmis:name", propertyNameValue)
|
||||
.then().updateProperty("cmis:description", "some description")
|
||||
.and().assertThat().contentPropertyHasValue("cmis:description", "some description");
|
||||
.and().assertThat().contentPropertyHasValue("cmis:description", "some description");
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site contributor is able to update properties to a valid document created by himself")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
public void contributorCanUpdateHisOwnFileProperties() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)).usingSite(testSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
cmisApi.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor))
|
||||
.usingSite(testSite).createFile(testFile).assertThat().existsInRepo()
|
||||
.then().updateProperty("cmis:name", propertyNameValue)
|
||||
.and().assertThat().contentPropertyHasValue("cmis:name", propertyNameValue)
|
||||
.and().assertThat().contentPropertyHasValue("cmis:name", propertyNameValue)
|
||||
.then().updateProperty("cmis:description", "some description")
|
||||
.and().assertThat().contentPropertyHasValue("cmis:description", "some description");
|
||||
.and().assertThat().contentPropertyHasValue("cmis:description", "some description");
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site collaborator is able to update properties to a valid document created by site manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS })
|
||||
public void contributorCanUpdateFilePropertiesCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||
.and().updateProperty("cmis:name", propertyNameValue)
|
||||
.and().assertThat().contentPropertyHasValue("cmis:name", propertyNameValue)
|
||||
.and().updateProperty("cmis:name", propertyNameValue)
|
||||
.and().assertThat().contentPropertyHasValue("cmis:name", propertyNameValue)
|
||||
.then().updateProperty("cmis:description", "some description")
|
||||
.and().assertThat().contentPropertyHasValue("cmis:description", "some description");
|
||||
.and().assertThat().contentPropertyHasValue("cmis:description", "some description");
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify site consumer is not able to update properties to a valid document created by site manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void consumerCannotUpdateFilePropertiesCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.then().authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer))
|
||||
.and().updateProperty("cmis:name", propertyNameValue);
|
||||
.and().updateProperty("cmis:name", propertyNameValue);
|
||||
}
|
||||
|
||||
@Bug(id="REPO-4301")
|
||||
@Bug(id = "REPO-5388")
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify disabled user is not able to update properties")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions=CmisUnauthorizedException.class)
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisUnauthorizedException.class)
|
||||
public void disabledUserCannotUpdateFileProperties() throws Exception
|
||||
{
|
||||
UserModel disabledUser = dataUser.createRandomTestUser();
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
cmisApi.authenticateUser(disabledUser).usingShared()
|
||||
.createFile(testFile).assertThat().existsInRepo();
|
||||
.createFile(testFile).assertThat().existsInRepo();
|
||||
dataUser.usingAdmin().disableUser(disabledUser);
|
||||
cmisApi.usingResource(testFile).updateProperty("cmis:name", propertyNameValue);
|
||||
}
|
||||
|
||||
@TestRail(section = {"cmis-api"}, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify non invited user is not able to update properties to a document created by site manager")
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS}, expectedExceptions={CmisPermissionDeniedException.class, CmisUnauthorizedException.class})
|
||||
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS }, expectedExceptions = CmisPermissionDeniedException.class)
|
||||
public void nonInvitedUserCannotUpdateFilePropertiesCreatedByManager() throws Exception
|
||||
{
|
||||
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN);
|
||||
UserModel nonInvitedUser = dataUser.createRandomTestUser();
|
||||
propertyNameValue = RandomData.getRandomAlphanumeric();
|
||||
cmisApi.authenticateUser(testUser).usingSite(testSite)
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.createFile(testFile).assertThat().existsInRepo()
|
||||
.then().authenticateUser(nonInvitedUser)
|
||||
.and().updateProperty("cmis:name", propertyNameValue);
|
||||
.and().updateProperty("cmis:name", propertyNameValue);
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
|
||||
<suite name="CMISSuites" parallel="classes" thread-count="1"
|
||||
preserve-order="true">
|
||||
<suite name="CMISSuites" parallel="classes" thread-count="1">
|
||||
<listeners>
|
||||
<listener class-name="org.alfresco.utility.report.HtmlReportListener"/>
|
||||
<listener class-name="org.alfresco.utility.testrail.TestRailExecutorListener"/>
|
||||
|
@@ -18,9 +18,17 @@ jmx.useJolokiaAgent=false
|
||||
# enable this option to view if on server there are tenants or not
|
||||
serverHealth.showTenants=true
|
||||
|
||||
# set CMIS binding to 'browser' or 'atom'
|
||||
## BROWSER binding
|
||||
cmis.binding=browser
|
||||
cmis.basePath=/alfresco/api/-default-/public/cmis/versions/1.1/${cmis.binding}
|
||||
cmis.basePath=/alfresco/api/-default-/public/cmis/versions/1.1/browser
|
||||
|
||||
# ATOM binding
|
||||
#cmis.binding=atom
|
||||
#cmis.basePath=/alfresco/api/-default-/public/cmis/versions/1.1/atom
|
||||
|
||||
# WEBSERVICES binding
|
||||
#cmis.binding=webservices
|
||||
#cmis.basePath=/alfresco/cmisws/cmis?wsdl
|
||||
|
||||
# TEST MANAGEMENT SECTION - Test Rail
|
||||
#
|
||||
|
1
pom.xml
1
pom.xml
@@ -97,7 +97,6 @@
|
||||
<dependency.postgresql.version>42.2.18</dependency.postgresql.version>
|
||||
<dependency.mysql.version>8.0.22</dependency.mysql.version>
|
||||
<dependency.mariadb.version>2.7.0</dependency.mariadb.version>
|
||||
|
||||
<dependency.tas-utility.version>3.0.37</dependency.tas-utility.version>
|
||||
<dependency.rest-assured.version>3.3.0</dependency.rest-assured.version>
|
||||
<dependency.javax.json.version>1.1.4</dependency.javax.json.version>
|
||||
|
Reference in New Issue
Block a user