From 9c8af9f670f9fae6a4224c6a119c9ae31e8b2082 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 22 Oct 2020 10:03:21 +0300 Subject: [PATCH 1/6] Merge pull request #1250 from Alfresco/feature-2.7/APPS-238_RunUITests_no Feature 2.7/apps 238 run ui tests no --- .travis.yml | 71 ++++++++++++++++++++++++++++++++++++++++++--- travis-env-vars.yml | 4 +++ 2 files changed, 71 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index aed8a6a880..b17ad8b9ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,6 +68,7 @@ jobs: stage: Tests script: - echo "Enterprise Integrations Tests on MySQL" + - name: "Community Rest API Tests" stage: Tests before_install: @@ -76,6 +77,7 @@ jobs: install: travis_wait 20 mvn -B install -PinstallAlfresco,apply-rm-community -q -f $AUTOMATION_COMMUNITY_PATH/pom.xml script: - travis_wait 60 mvn -B install -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_COMMUNITY_PATH/pom.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn + - name: "Enterprise Rest API Tests" stage: Tests before_install: @@ -84,22 +86,83 @@ jobs: install: travis_wait 20 mvn -B install -PinstallAlfresco,apply-rm-enterprise -q -f $AUTOMATION_ENTERPRISE_PATH/pom.xml script: - travis_wait 60 mvn -B install -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_ENTERPRISE_PATH/pom.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn - - name: "Community UI Tests ..." + + - &community_shared_UI_configuration + name: "Community Smoke UI Tests for Records" stage: Tests + addons: + firefox: "43.0.1" + artifacts: + paths: + - ./rm-automation/rm-automation-ui/target/surefire-reports + - ./rm-automation/rm-automation-ui/target/reports + - ./rm-automation/rm-automation-ui/target/screenshots + target_paths: $TRAVIS_BUILD_NUMBER before_install: - travis_retry travis_wait 90 mvn -B install -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -DskipTests -q - travis_wait 5 bash scripts/downloadInstaller.sh $AUTOMATION_UI_PATH/target install: travis_wait 20 mvn -B install -PinstallAlfresco,apply-rm-community -q -f $AUTOMATION_UI_PATH/pom.xml script: - - echo "Community UI Tests ..." - - name: "Enterprise UI Tests ..." + - travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_UI_PATH/pom.xml -DsuiteXmlFile=communitySmokeRecords.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} + + - <<: *community_shared_UI_configuration + name: "Community Smoke UI Tests for actions in RM site" + script: + - travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B install -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_UI_PATH/pom.xml -DsuiteXmlFile=communitySmokeRMSite.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} + + - <<: *community_shared_UI_configuration + name: "Community Level 2 UI Tests" + script: + - travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B install -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_UI_PATH/pom.xml -DsuiteXmlFile=communityLevel2Tests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} + + - &enterprise_shared_UI_configuration + name: "Enterprise Level 2 UI Tests" stage: Tests + addons: + firefox: "43.0.1" + artifacts: + paths: + - ./rm-automation/rm-automation-ui/target/surefire-reports + - ./rm-automation/rm-automation-ui/target/reports + - ./rm-automation/rm-automation-ui/target/screenshots + target_paths: $TRAVIS_BUILD_NUMBER before_install: - travis_retry travis_wait 90 mvn -B install -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -DskipTests -q - travis_wait 5 bash scripts/downloadInstaller.sh $AUTOMATION_UI_PATH/target install: travis_wait 20 mvn -B install -PinstallAlfresco,apply-rm-enterprise -q -f $AUTOMATION_UI_PATH/pom.xml script: - - echo "Enterprise UI Tests ..." + - travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_UI_PATH/pom.xml -DsuiteXmlFile=enterpriseLevel2Tests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} + + - <<: *enterprise_shared_UI_configuration + name: "Enterprise Classification Level 2 UI Tests" + script: + - travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_UI_PATH/pom.xml -DsuiteXmlFile=enterpriseLevel2ClassificationTests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} + + - <<: *enterprise_shared_UI_configuration + name: "Enterprise Content Classification UI Tests" + script: + - travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_UI_PATH/pom.xml -DsuiteXmlFile=enterpriseContentClassificationTests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} + + - <<: *enterprise_shared_UI_configuration + name: "Enterprise Folders Classification UI Tests" + script: + - travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_UI_PATH/pom.xml -DsuiteXmlFile=enterpriseFoldersClassificationTests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} + + - <<: *enterprise_shared_UI_configuration + name: "Enterprise Guides UI Tests" + script: + - travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_UI_PATH/pom.xml -DsuiteXmlFile=enterpriseGuidesTests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} + + - <<: *enterprise_shared_UI_configuration + name: "Enterprise Security Marks UI Tests" + script: + - travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_UI_PATH/pom.xml -DsuiteXmlFile=enterpriseSecurityMarksTests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} + + - <<: *enterprise_shared_UI_configuration + name: "Enterprise Console and Configuration UI Tests" + script: + - travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_UI_PATH/pom.xml -DsuiteXmlFile=enterpriseConsoleAndConfigurationTests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} + - name: "Source Clear Scan (SCA)" stage: Security Scans script: diff --git a/travis-env-vars.yml b/travis-env-vars.yml index cb6c4b75d6..2cc02543db 100644 --- a/travis-env-vars.yml +++ b/travis-env-vars.yml @@ -4,3 +4,7 @@ env: - AUTOMATION_ENTERPRISE_PATH=rm-automation/rm-automation-enterprise-rest-api - AUTOMATION_UI_PATH=rm-automation/rm-automation-ui - S3_INSTALLER_PATH=/eu.dl.alfresco.com/release/enterprise/5.2/5.2.7/5.2.7.4/alfresco-content-services-installer-5.2.7.4-linux-x64.bin + - ALFRESCO_URL="http://localhost:8080/alfresco" + - SHARE_URL="http://localhost:8080/share" + - DISPLAY=:99.0 + - WEBDRIVER_ARGUMENTS='-Dwebdriver.local.grid=true -Dwebdriver.browser=RemoteFireFox -Dwebdriver.localGrid=false -Dorg.alfresco.rm.timeout_seconds.MEDIUM=30' From d6799537597464dd07ee26a1ee51bc50ced2fa14 Mon Sep 17 00:00:00 2001 From: Rodica Sutu Date: Wed, 29 Jan 2020 09:46:04 +0200 Subject: [PATCH 2/6] move the cmis query tests add some additional usecase (cherry picked from commit c20cfb3c6ffcb5ef82c58e61e006627723cf1aed) (cherry picked from commit a18c22155fd1a7d79f38f7db7cbc78d42489ff11) --- .../rm/community/search/CmisQueryTests.java | 218 ++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java new file mode 100644 index 0000000000..53795fce3f --- /dev/null +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java @@ -0,0 +1,218 @@ +/* + * #%L + * Alfresco Records Management Module + * %% + * Copyright (C) 2005 - 2020 Alfresco Software Limited + * %% + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + * #L% + */ + +package org.alfresco.rest.rm.community.search; + +import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_MANAGER; +import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix; +import static org.alfresco.utility.report.log.Step.STEP; +import static org.testng.AssertJUnit.assertEquals; +import static org.testng.AssertJUnit.assertFalse; +import static org.testng.AssertJUnit.assertTrue; + +import org.alfresco.dataprep.ContentActions; +import org.alfresco.rest.rm.community.base.BaseRMRestTest; +import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild; +import org.alfresco.rest.rm.community.model.user.UserPermissions; +import org.alfresco.test.AlfrescoTest; +import org.alfresco.utility.constants.UserRole; +import org.alfresco.utility.model.FileModel; +import org.alfresco.utility.model.FileType; +import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.UserModel; +import org.apache.chemistry.opencmis.client.api.ItemIterable; +import org.apache.chemistry.opencmis.client.api.OperationContext; +import org.apache.chemistry.opencmis.client.api.QueryResult; +import org.apache.chemistry.opencmis.client.runtime.OperationContextImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +/** + * Test to check that RM doesn't break CMIS query + * + * @author jcule, Rodica Sutu + * @since 2.5.4 + * @since 3.3 + */ +public class CmisQueryTests extends BaseRMRestTest +{ + private static final String SEARCH_TERM = generateTestPrefix(CmisQueryTests.class); + private static final String sqlWithName = + "SELECT cmis:name FROM cmis:document where CONTAINS('cmis:name:*" + SEARCH_TERM + "*')"; + + private SiteModel collaborationSite; + private UserModel nonRMUser, rmUser; + private RecordCategoryChild recordFolder; + + @Autowired + private ContentActions contentActions; + + /** + * Create some test data: + *
+     *     - a collaboration site with documents
+     *     - in place records
+     *     - category with folder and records
+     *     - a user with no rm rights (no rights to see the record from file plan)
+     *     - a user with rights to see the records and the other documents created
+     * 
+ */ + @BeforeClass (alwaysRun = true) + public void setupCmisQuery() throws Exception + { + STEP("Create a collaboration site"); + collaborationSite = dataSite.usingAdmin().createPrivateRandomSite(); + + STEP("Create 10 documents ending with SEARCH_TERM"); + for (int i = 0; ++i <= 10; ) + { + FileModel fileModel = new FileModel(String.format("%s.%s", "Doc" + i + SEARCH_TERM, + FileType.TEXT_PLAIN.extention)); + dataContent.usingAdmin().usingSite(collaborationSite).createContent(fileModel); + } + + STEP("Create a collaborator user for the collaboration site"); + nonRMUser = getDataUser().createRandomTestUser(); + getDataUser().addUserToSite(nonRMUser, collaborationSite, UserRole.SiteManager); + + STEP("Create 10 documents and declare as records"); + for (int i = 0; ++i <= 10; ) + { + FileModel fileModel = new FileModel(String.format("%s.%s", "InPlace " + SEARCH_TERM + i, + FileType.TEXT_PLAIN.extention)); + fileModel = dataContent.usingUser(nonRMUser).usingSite(collaborationSite).createContent(fileModel); + getRestAPIFactory().getFilesAPI(nonRMUser).declareAsRecord(fileModel.getNodeRefWithoutVersion()); + } + + STEP("Create record folder and some records "); + recordFolder = createCategoryFolderInFilePlan(); + for (int i = 0; ++i <= 10; ) + { + createElectronicRecord(recordFolder.getId(), "Record " + SEARCH_TERM + i); + } + STEP("Create an rm user with read permission over the category created and contributor role within the " + + "collaboration site"); + rmUser = getDataUser().createRandomTestUser(); + getRestAPIFactory().getRMUserAPI().assignRoleToUser(rmUser.getUsername(), ROLE_RM_MANAGER); + getRestAPIFactory().getRMUserAPI().addUserPermission(recordFolder.getParentId(), rmUser, UserPermissions.PERMISSION_READ_RECORDS); + getDataUser().addUserToSite(rmUser, collaborationSite, UserRole.SiteContributor); + + + //do a cmis query to wait for solr indexing + long currentTime = System.currentTimeMillis(); + long endTime = 0; + do + { + try + { + endTime = System.currentTimeMillis(); + ItemIterable results = contentActions.getCMISSession(getAdminUser().getUsername(), + getAdminUser().getPassword()).query(sqlWithName, false); + assertEquals("Total number of items is not 30, got " + results.getTotalNumItems() + "total items", + 30, results.getTotalNumItems()); + break; + } + catch (AssertionError | Exception e) + { + if (endTime - currentTime > 30000) + { + throw new AssertionError("Maximum retry period reached, test failed.", e); + } + Thread.sleep(5000); + } + } while (true); + } + + /** + *
+     * Given the RM site created
+     * When I execute a cmis query to get all the documents names
+     * Then I get all documents names 100 per page
+     * 
+ */ + @Test + @AlfrescoTest (jira = "MNT-19442") + public void getAllDocumentsNamesCmisQuery() + { + // execute the cmis query + String cq = "SELECT cmis:name FROM cmis:document"; + ItemIterable results = + contentActions.getCMISSession(getAdminUser().getUsername(), getAdminUser().getPassword()).query(cq, + false); + + // check the total number of items is greater than 100 and has more items is true + assertTrue("Has more items not true.", results.getHasMoreItems()); + assertTrue("Total number of items is not greater than 100. Total number of items received" + results.getTotalNumItems(), + results.getTotalNumItems() > 100); + assertEquals("Expected 100 items per page and got " + results.getPageNumItems() + " per page.", 100, + results.getPageNumItems()); + } + + /** + *
+     * Given the RM site created
+     * When I execute a cmis query to get all the documents names with a particular name
+     * Then I get all documents names user has permission
+     * 
+ */ + @Test + @AlfrescoTest (jira = "MNT-19442") + public void getDocumentsWithSpecificNamesCmisQuery() throws Exception + { + // execute the cmis query + ItemIterable results = + contentActions.getCMISSession(nonRMUser.getUsername(), nonRMUser.getPassword()).query(sqlWithName, + false); + assertEquals("Total number of items is not 20, got " + results.getTotalNumItems() + " total items", + 20, results.getTotalNumItems()); + // check the has more items is false + assertFalse("Has more items not false.", results.getHasMoreItems()); + assertEquals("Expected 20 items per page and got " + results.getPageNumItems() + " per page.", 20, + results.getPageNumItems()); + } + + /** + *
+     * Given the RM site created
+     * When I execute a cmis query to get all the documents names with a specific number per page
+     * Then I get all documents names paged as requested that the user has permission
+     * 
+ */ + @Test + @AlfrescoTest (jira = "MNT-19442") + public void getDocumentsCmisQueryWithPagination() throws Exception + { + OperationContext oc = new OperationContextImpl(); + oc.setMaxItemsPerPage(10); + ItemIterable results = + contentActions.getCMISSession(rmUser.getUsername(), rmUser.getPassword()).query(sqlWithName, + false, oc); + + // check the total number of items and has more items is true + assertTrue("Has more items not true. ", results.getHasMoreItems()); + assertEquals("Total number of items is not 30 " + results.getTotalNumItems(), 30, + results.getTotalNumItems()); + assertEquals("Expected 10 items per page and got " + results.getPageNumItems() + " per page.", + 10, results.getPageNumItems()); + } + + @AfterClass + private void clearCmisQueryTests() + { + dataSite.usingAdmin().deleteSite(collaborationSite); + getRestAPIFactory().getRecordCategoryAPI().deleteRecordCategory(recordFolder.getParentId()); + getDataUser().usingAdmin().deleteUser(rmUser); + getDataUser().usingAdmin().deleteUser(nonRMUser); + } +} From 5c8ac1598f41b85a17a657fd3d3cd6644e7db9dd Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Fri, 3 Apr 2020 09:40:46 +0300 Subject: [PATCH 3/6] fix header (cherry picked from commit 278699f1837015f25fed2d5ba8e264cd1ab2b393) --- .../rm/community/search/CmisQueryTests.java | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java index 53795fce3f..33c83389ad 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java @@ -4,9 +4,24 @@ * %% * Copyright (C) 2005 - 2020 Alfresco Software Limited * %% - * License rights for this program may be obtained from Alfresco Software, Ltd. - * pursuant to a written agreement and any use of this program without such an - * agreement is prohibited. + * This file is part of the Alfresco software. + * - + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * - + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * - + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * - + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . * #L% */ From fa44d00d9c646130db7fc2ecd8d9f3dbcdf7da6a Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Fri, 3 Apr 2020 14:51:02 +0300 Subject: [PATCH 4/6] code review comments (cherry picked from commit 604fc7785e4fa78a92743a55f115883167b3ddc3) --- .../alfresco/rest/rm/community/search/CmisQueryTests.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java index 33c83389ad..8be8ff293d 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java @@ -63,7 +63,7 @@ import org.testng.annotations.Test; public class CmisQueryTests extends BaseRMRestTest { private static final String SEARCH_TERM = generateTestPrefix(CmisQueryTests.class); - private static final String sqlWithName = + private static final String SQL_WITH_NAME = "SELECT cmis:name FROM cmis:document where CONTAINS('cmis:name:*" + SEARCH_TERM + "*')"; private SiteModel collaborationSite; @@ -133,7 +133,7 @@ public class CmisQueryTests extends BaseRMRestTest { endTime = System.currentTimeMillis(); ItemIterable results = contentActions.getCMISSession(getAdminUser().getUsername(), - getAdminUser().getPassword()).query(sqlWithName, false); + getAdminUser().getPassword()).query(SQL_WITH_NAME, false); assertEquals("Total number of items is not 30, got " + results.getTotalNumItems() + "total items", 30, results.getTotalNumItems()); break; @@ -187,7 +187,7 @@ public class CmisQueryTests extends BaseRMRestTest { // execute the cmis query ItemIterable results = - contentActions.getCMISSession(nonRMUser.getUsername(), nonRMUser.getPassword()).query(sqlWithName, + contentActions.getCMISSession(nonRMUser.getUsername(), nonRMUser.getPassword()).query(SQL_WITH_NAME, false); assertEquals("Total number of items is not 20, got " + results.getTotalNumItems() + " total items", 20, results.getTotalNumItems()); @@ -211,7 +211,7 @@ public class CmisQueryTests extends BaseRMRestTest OperationContext oc = new OperationContextImpl(); oc.setMaxItemsPerPage(10); ItemIterable results = - contentActions.getCMISSession(rmUser.getUsername(), rmUser.getPassword()).query(sqlWithName, + contentActions.getCMISSession(rmUser.getUsername(), rmUser.getPassword()).query(SQL_WITH_NAME, false, oc); // check the total number of items and has more items is true From bdc20c068a66718a595b6fa31f0efc64215d7bc6 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Fri, 3 Apr 2020 16:26:03 +0300 Subject: [PATCH 5/6] fix the parameter (cherry picked from commit d3206cf36326fecddea596ebc94131ee99810d1f) --- .../org/alfresco/rest/rm/community/search/CmisQueryTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java index 8be8ff293d..8624e2d00f 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/CmisQueryTests.java @@ -119,7 +119,7 @@ public class CmisQueryTests extends BaseRMRestTest STEP("Create an rm user with read permission over the category created and contributor role within the " + "collaboration site"); rmUser = getDataUser().createRandomTestUser(); - getRestAPIFactory().getRMUserAPI().assignRoleToUser(rmUser.getUsername(), ROLE_RM_MANAGER); + getRestAPIFactory().getRMUserAPI().assignRoleToUser(rmUser.getUsername(), ROLE_RM_MANAGER.roleId); getRestAPIFactory().getRMUserAPI().addUserPermission(recordFolder.getParentId(), rmUser, UserPermissions.PERMISSION_READ_RECORDS); getDataUser().addUserToSite(rmUser, collaborationSite, UserRole.SiteContributor); From e0d42393fad532f9d741ce87a3e95e074a90e402 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 22 Oct 2020 13:46:09 +0300 Subject: [PATCH 6/6] increase travis wait time --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b17ad8b9ad..4d3b1fe653 100644 --- a/.travis.yml +++ b/.travis.yml @@ -141,7 +141,7 @@ jobs: - <<: *enterprise_shared_UI_configuration name: "Enterprise Content Classification UI Tests" script: - - travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_UI_PATH/pom.xml -DsuiteXmlFile=enterpriseContentClassificationTests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} + - travis_wait 120 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_UI_PATH/pom.xml -DsuiteXmlFile=enterpriseContentClassificationTests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} - <<: *enterprise_shared_UI_configuration name: "Enterprise Folders Classification UI Tests"