diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
index 9b3dc87f3d..2914650654 100644
--- a/.github/workflows/pull-request.yml
+++ b/.github/workflows/pull-request.yml
@@ -109,7 +109,7 @@ jobs:
fail-fast: false
matrix:
e2e-suites:
- - name: "listViews,navigation"
+ - name: "listViews"
id: 1
- name: "search"
id: 2
@@ -119,22 +119,14 @@ jobs:
id: 4
- name: "pagination"
id: 5
- - name: "actionsAvailableFilesFolders"
- id: 6
- - name: "actionsAvailableLibraries,actionsAvailableNewMenu"
- id: 7
- - name: "actionsAvailableSpecialPermissions"
- id: 8
- name: "copyMoveActions"
- id: 9
+ id: 6
- name: "deleteActions"
- id: 10
+ id: 7
- name: "editActions,favoriteActions"
- id: 11
- - name: "libraryActions"
- id: 12
+ id: 8
- name: "uploadDownloadActions"
- id: 13
+ id: 9
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -182,6 +174,8 @@ jobs:
id: 5
- name: "special-permissions"
id: 6
+ - name: "pagination"
+ id: 7
steps:
- name: Checkout
uses: actions/checkout@v3
diff --git a/app/src/app.config.json b/app/src/app.config.json
index 6fbceff50a..c28817d8e8 100644
--- a/app/src/app.config.json
+++ b/app/src/app.config.json
@@ -12,14 +12,17 @@
"plugins": {
"aosPlugin": true,
"contentService": true,
- "folderRules": true
+ "folderRules": true,
+ "tags": true,
+ "categories": true
},
"oauth2": {
"host": "{protocol}//{hostname}{:port}/auth/realms/alfresco",
"clientId": "alfresco",
"scope": "openid",
"secret": "",
- "implicitFlow": true,
+ "implicitFlow": false,
+ "codeFlow": true,
"silentLogin": true,
"publicUrls": ["**/preview/s/*", "**/settings", "**/blank"],
"redirectSilentIframeUri": "{protocol}//{hostname}{:port}/assets/silent-refresh.html",
diff --git a/app/src/app/app.component.html b/app/src/app/app.component.html
index 8d2522a861..862e06c534 100644
--- a/app/src/app/app.component.html
+++ b/app/src/app/app.component.html
@@ -1,2 +1,2 @@
-
{{ pageHeading | async | translate }}
+{{ pageHeading | async | translate }}
diff --git a/app/src/app/app.component.scss b/app/src/app/app.component.scss
index e79d1f871b..6e9a3a513d 100644
--- a/app/src/app/app.component.scss
+++ b/app/src/app/app.component.scss
@@ -2,7 +2,7 @@ app-root {
display: flex;
flex: 1;
- .sr-only {
+ .aca-sr-only {
position: absolute;
width: 1px;
height: 1px;
diff --git a/docker/docker-entrypoint.d/30-sed-on-appconfig.sh b/docker/docker-entrypoint.d/30-sed-on-appconfig.sh
index 2fd0a52568..603719d4c4 100755
--- a/docker/docker-entrypoint.d/30-sed-on-appconfig.sh
+++ b/docker/docker-entrypoint.d/30-sed-on-appconfig.sh
@@ -50,6 +50,13 @@ if [ -n "${APP_CONFIG_OAUTH2_IMPLICIT_FLOW}" ]; then
-i "$APP_CONFIG_FILE"
fi
+if [ -n "${APP_CONFIG_OAUTH2_CODE_FLOW}" ]; then
+ echo "SET APP_CONFIG_OAUTH2_CODE_FLOW"
+
+ sed -e "s/\"codeFlow\": [^,]*/\"codeFlow\": ${APP_CONFIG_OAUTH2_CODE_FLOW}/g" \
+ -i "$APP_CONFIG_FILE"
+fi
+
if [ -n "${APP_CONFIG_OAUTH2_SILENT_LOGIN}" ]; then
echo "SET APP_CONFIG_OAUTH2_SILENT_LOGIN"
diff --git a/docs/getting-started/docker.md b/docs/getting-started/docker.md
index f9d115ed8f..fd8483982c 100644
--- a/docs/getting-started/docker.md
+++ b/docs/getting-started/docker.md
@@ -74,6 +74,7 @@ docker run --rm -it \
| APP_CONFIG_OAUTH2_HOST | `oauth2.host` |
| APP_CONFIG_OAUTH2_CLIENTID | `oauth2.clientId` |
| APP_CONFIG_OAUTH2_IMPLICIT_FLOW | `oauth2.implicitFlow` |
+| APP_CONFIG_OAUTH2_CODE_FLOW | `oauth2.codeFlow` |
| APP_CONFIG_OAUTH2_SILENT_LOGIN | `oauth2.silentLogin` |
| APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI | `oauth2.redirectSilentIframeUri` |
| APP_CONFIG_OAUTH2_REDIRECT_LOGIN | `oauth2.redirectUri` |
diff --git a/docs/getting-started/sso.md b/docs/getting-started/sso.md
index c0f02b363d..61a6d14583 100644
--- a/docs/getting-started/sso.md
+++ b/docs/getting-started/sso.md
@@ -22,7 +22,8 @@ You can find the settings in the `app.config.json` file, and they look similar t
"clientId": "alfresco",
"scope": "openid",
"secret": "",
- "implicitFlow": true,
+ "implicitFlow": false,
+ "codeFlow": true,
"silentLogin": true,
"redirectSilentIframeUri": "./assets/silent-refresh.html",
"redirectUri": "/",
diff --git a/docs/ja/getting-started/sso.md b/docs/ja/getting-started/sso.md
index 203ec75b3e..b46076a031 100644
--- a/docs/ja/getting-started/sso.md
+++ b/docs/ja/getting-started/sso.md
@@ -23,7 +23,8 @@ Basic 認証に加えて、Content Application を以下で使用できます:
"clientId": "alfresco",
"scope": "openid",
"secret": "",
- "implicitFlow": true,
+ "implicitFlow": false,
+ "codeFlow": true,
"silentLogin": true,
"redirectSilentIframeUri": "./assets/silent-refresh.html",
"redirectUri": "/",
diff --git a/e2e/playwright/actions/src/tests/create-folder.spec.ts b/e2e/playwright/actions/src/tests/create-folder.spec.ts
index ae13e6e8ff..649118cc3b 100644
--- a/e2e/playwright/actions/src/tests/create-folder.spec.ts
+++ b/e2e/playwright/actions/src/tests/create-folder.spec.ts
@@ -33,7 +33,6 @@ import {
errorStrings,
test
} from '@alfresco/playwright-shared';
-import { logger } from '@alfresco/adf-cli/scripts/logger';
test.describe('Create folders', () => {
const apiClientFactory = new ApiClientFactory();
@@ -56,7 +55,7 @@ test.describe('Create folders', () => {
nodesApi = await NodesApi.initialize(username, username);
await nodesApi.createFolder(commonFolderName);
} catch (error) {
- logger.error(`beforeAll failed : ${error}`);
+ console.error(`beforeAll failed : ${error}`);
}
});
@@ -77,7 +76,7 @@ test.describe('Create folders', () => {
await personalFiles.navigate();
await personalFiles.selectCreateFolder();
} catch (error) {
- logger.error(`beforeEach failed : ${error}`);
+ console.error(`beforeEach failed : ${error}`);
}
});
@@ -85,7 +84,7 @@ test.describe('Create folders', () => {
try {
await nodesApi.deleteCurrentUserNodes();
} catch (error) {
- logger.error(`afterAll failed : ${error}`);
+ console.error(`afterAll failed : ${error}`);
}
});
diff --git a/e2e/playwright/actions/src/tests/create-library.spec.ts b/e2e/playwright/actions/src/tests/create-library.spec.ts
index bde61ce502..75b0fae39e 100644
--- a/e2e/playwright/actions/src/tests/create-library.spec.ts
+++ b/e2e/playwright/actions/src/tests/create-library.spec.ts
@@ -35,7 +35,6 @@ import {
Breadcrumb,
TrashcanApi
} from '@alfresco/playwright-shared';
-import { logger } from '@alfresco/adf-cli/scripts/logger';
test.describe('Create Libraries ', () => {
const apiClientFactory = new ApiClientFactory();
@@ -70,7 +69,7 @@ test.describe('Create Libraries ', () => {
await sitesApi.createSite(commonTrashLibraryName);
await sitesApi.deleteSites([commonTrashLibraryName], false);
} catch (error) {
- logger.error(`beforeAll failed : ${error}`);
+ console.error(`beforeAll failed : ${error}`);
}
});
@@ -91,7 +90,7 @@ test.describe('Create Libraries ', () => {
await myLibrariesPage.navigate();
await myLibrariesPage.selectCreateLibrary();
} catch (error) {
- logger.error(`beforeEach failed : ${error}`);
+ console.error(`beforeEach failed : ${error}`);
}
});
@@ -101,7 +100,7 @@ test.describe('Create Libraries ', () => {
const trashcanApi = await TrashcanApi.initialize(username, username);
await trashcanApi.emptyTrashcan();
} catch (error) {
- logger.error(`afterAll failed : ${error}`);
+ console.error(`afterAll failed : ${error}`);
}
});
diff --git a/e2e/playwright/actions/src/tests/library/library-actions.spec.ts b/e2e/playwright/actions/src/tests/library/library-actions.spec.ts
new file mode 100644
index 0000000000..a95ee341bc
--- /dev/null
+++ b/e2e/playwright/actions/src/tests/library/library-actions.spec.ts
@@ -0,0 +1,442 @@
+/*!
+ * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
+ *
+ * Alfresco Example Content Application
+ *
+ * This file is part of the Alfresco Example Content Application.
+ * 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:
+ *
+ * The Alfresco Example Content Application 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.
+ *
+ * The Alfresco Example Content Application 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
+ * from Hyland Software. If not, see .
+ */
+
+import { expect } from '@playwright/test';
+import {
+ Utils,
+ ApiClientFactory,
+ test,
+ SitesApi,
+ FavoritesPageApi,
+ timeouts,
+ DataTableComponent,
+ SnackBarComponent,
+ AdfConfirmDialogComponent,
+ AcaHeader,
+ MatMenuComponent,
+ TrashcanApi
+} from '@alfresco/playwright-shared';
+import { Site } from '@alfresco/js-api';
+
+test.describe('Library actions ', () => {
+ const notMemberString = 'Not a member';
+ const managerRole = 'Manager';
+ const contributorRole = 'Contributor';
+ const consumerRole = 'Consumer';
+ const joinButton = 'Join';
+ const libraryJoinedMessage = 'Library joined';
+ const requestToJoinMessage = 'Request sent to join this library';
+ const cancelJoinRequestButton = 'Cancel Join Request';
+ const cancelJoinRequestMessage = 'Canceled the request to join the library';
+ const leaveLibraryButton = 'Leave Library';
+ const leftMessage = 'You have left the library';
+ const favoriteButton = 'Favorite';
+ const removeFavoriteButton = 'Remove Favorite';
+ const deleteButton = 'Delete';
+ const libraryDeletedMessage = 'Library deleted';
+ const siteString = 'site';
+ const loadString = 'load';
+ const domContentLoadedString = 'domcontentloaded';
+
+ const username2 = `user-${Utils.random()}`;
+ const adminLibrary1 = `playwright-A-library-${Utils.random()}`;
+ const adminLibrary2 = `playwright-A-library-${Utils.random()}`;
+ const adminLibrary3 = `playwright-A-library-${Utils.random()}`;
+ const adminLibrary4 = `playwright-A-library-${Utils.random()}`;
+ const adminModerateLibrary1 = `playwright-Am-library-${Utils.random()}`;
+ const adminModerateLibrary2 = `playwright-Am-library-${Utils.random()}`;
+ const adminModerateLibrary3 = `playwright-Am-library-${Utils.random()}`;
+ const adminModerateLibrary4 = `playwright-Am-library-${Utils.random()}`;
+ const user1Library1 = `playwright-U1-library-${Utils.random()}`;
+ const user1Library2 = `playwright-U1-library-${Utils.random()}`;
+ const user1Library3 = `playwright-U1-library-${Utils.random()}`;
+ const user1Library4 = `playwright-U1-library-${Utils.random()}`;
+ const user1Library5 = `playwright-U1-library-${Utils.random()}`;
+ const user2Library1 = `playwright-U2-library-${Utils.random()}`;
+ const user2Library2 = `playwright-U2-library-${Utils.random()}`;
+ const user2Library3 = `playwright-U2-library-${Utils.random()}`;
+ const user2Library4 = `playwright-U2-library-${Utils.random()}`;
+ const user2Library5Delete = `playwright-T-library-${Utils.random()}`;
+ const user2Library6Delete = `playwright-T-library-${Utils.random()}`;
+ const user2Library7Delete = `playwright-T-library-${Utils.random()}`;
+
+ const adminLibraryIds = [adminLibrary1, adminLibrary2, adminLibrary3, adminLibrary4];
+ const adminModerateLibraryIds = [adminModerateLibrary1, adminModerateLibrary2, adminModerateLibrary3, adminModerateLibrary4];
+ const user1LibraryIds = [user1Library1, user1Library2, user1Library3, user1Library4, user1Library5];
+ const user2LibraryIds = [user2Library1, user2Library2, user2Library3, user2Library4];
+
+ let adminSitesApi: SitesApi;
+ let user2SitesApi: SitesApi;
+
+ test.beforeAll(async () => {
+ test.setTimeout(timeouts.extendedTest);
+ const apiClientFactory = new ApiClientFactory();
+ const username1 = `user-${Utils.random()}`;
+ const siteRoles = [
+ Site.RoleEnum.SiteManager,
+ Site.RoleEnum.SiteContributor,
+ Site.RoleEnum.SiteCollaborator,
+ Site.RoleEnum.SiteConsumer,
+ Site.RoleEnum.SiteManager
+ ];
+ const user2LibraryIdsDelete = [user2Library5Delete, user2Library6Delete, user2Library7Delete];
+ try {
+ await apiClientFactory.setUpAcaBackend('admin');
+ await apiClientFactory.createUser({ username: username1 });
+ await apiClientFactory.createUser({ username: username2 });
+
+ adminSitesApi = await SitesApi.initialize('admin');
+ for (const libraryId of adminLibraryIds) {
+ await adminSitesApi.createSite(libraryId);
+ }
+
+ for (const libraryId of adminModerateLibraryIds) {
+ await adminSitesApi.createSite(libraryId, Site.VisibilityEnum.MODERATED);
+ }
+ await adminSitesApi.addSiteMember(adminLibrary3, username2, Site.RoleEnum.SiteContributor);
+
+ const user1SitesApi = await SitesApi.initialize(username1, username1);
+ for (let i = 0; i < user1LibraryIds.length; i++) {
+ await user1SitesApi.createSite(user1LibraryIds[i]);
+ await user1SitesApi.addSiteMember(user1LibraryIds[i], username2, siteRoles[i]);
+ }
+
+ user2SitesApi = await SitesApi.initialize(username2, username2);
+ for (const libraryId of user2LibraryIds) {
+ await user2SitesApi.createSite(libraryId);
+ }
+
+ for (const libraryId of user2LibraryIdsDelete) {
+ await user2SitesApi.createSite(libraryId);
+ }
+
+ await new Promise((resolve) => setTimeout(resolve, timeouts.extraLarge));
+ } catch (error) {
+ console.error(`Main beforeAll failed : ${error}`);
+ }
+ });
+
+ test.beforeEach(async ({ loginPage, myLibrariesPage }) => {
+ try {
+ await loginPage.loginUser(
+ { username: username2, password: username2 },
+ {
+ withNavigation: true,
+ waitForLoading: true
+ }
+ );
+ await myLibrariesPage.navigate();
+ } catch (error) {
+ console.error(`Main beforeEach failed : ${error}`);
+ }
+ });
+
+ test.afterAll(async () => {
+ try {
+ await adminSitesApi.deleteSites(adminLibraryIds);
+ await adminSitesApi.deleteSites(adminModerateLibraryIds);
+ await adminSitesApi.deleteSites(user1LibraryIds);
+ await adminSitesApi.deleteSites(user2LibraryIds);
+ const trashcanApi = await TrashcanApi.initialize(username2, username2);
+ await trashcanApi.emptyTrashcan();
+ } catch (error) {
+ console.error(`Main afterAll failed : ${error}`);
+ }
+ });
+
+ test.describe('My Libraries page', () => {
+ let libraryTable: DataTableComponent;
+ let snackBar: SnackBarComponent;
+ let confirmDialog: AdfConfirmDialogComponent;
+ let myLibrariesHeader: AcaHeader;
+ let libraryMenu: MatMenuComponent;
+
+ test.beforeEach(async ({ myLibrariesPage }) => {
+ try {
+ libraryTable = myLibrariesPage.dataTable;
+ snackBar = myLibrariesPage.snackBar;
+ confirmDialog = myLibrariesPage.confirmDialogComponent;
+ myLibrariesHeader = myLibrariesPage.acaHeader;
+ libraryMenu = myLibrariesPage.matMenu;
+ } catch (error) {
+ console.error(`My Libraries, beforeEach failed : ${error}`);
+ }
+ });
+
+ test('[C290106] Leave a library from My Libraries', async () => {
+ await expect(libraryTable.getCellByColumnNameAndRowItem(user1Library1, managerRole)).toBeVisible();
+ await libraryTable.performActionFromExpandableMenu(user1Library1, leaveLibraryButton);
+ await expect.soft(confirmDialog.getDialogTitle('Leave this library?')).toBeVisible();
+ await expect.soft(confirmDialog.getDialogContent('Leaving will remove your access.')).toBeVisible();
+ await expect.soft(confirmDialog.okButton).toBeVisible();
+ await expect.soft(confirmDialog.cancelButton).toBeVisible();
+ await confirmDialog.okButton.click();
+ await expect.soft(snackBar.getByMessageLocator(leftMessage)).toBeVisible();
+ await expect(libraryTable.getRowByName(user1Library1)).not.toBeVisible();
+ });
+
+ test('[C290111] Cancel Leave Library', async () => {
+ await expect(libraryTable.getCellByColumnNameAndRowItem(user1Library5, managerRole)).toBeVisible();
+ await libraryTable.performActionFromExpandableMenu(user1Library5, leaveLibraryButton);
+ await confirmDialog.cancelButton.click();
+ await expect(libraryTable.getCellByColumnNameAndRowItem(user1Library5, managerRole)).toBeVisible();
+ });
+
+ test('[C290107] Leave a library - failure notification', async () => {
+ await expect(libraryTable.getCellByColumnNameAndRowItem(user2Library1, managerRole)).toBeVisible();
+ await libraryTable.performActionFromExpandableMenu(user2Library1, leaveLibraryButton);
+ await confirmDialog.okButton.click();
+ await expect.soft(snackBar.getByMessageLocator('Cannot leave this library')).toBeVisible();
+ await expect(libraryTable.getCellByColumnNameAndRowItem(user2Library1, managerRole)).toBeVisible();
+ });
+
+ test('[C289974] Mark library as favorite from My Libraries', async () => {
+ await expect(libraryTable.getCellByColumnNameAndRowItem(adminLibrary3, contributorRole)).toBeVisible();
+ await libraryTable.getCellByColumnNameAndRowItem(adminLibrary3, contributorRole).click();
+ await myLibrariesHeader.clickMoreActions();
+ await libraryMenu.clickMenuItem(favoriteButton);
+ await myLibrariesHeader.clickMoreActions();
+ expect(await libraryMenu.isMenuItemVisible(removeFavoriteButton)).toBe(true);
+ });
+
+ test('[C289975] Remove library from favorites from My Libraries', async ({ myLibrariesPage }) => {
+ await myLibrariesPage.reload({ waitUntil: domContentLoadedString });
+ await expect(libraryTable.getRowByName(user2Library2)).toBeVisible();
+ await libraryTable.getRowByName(user2Library2).click();
+ await myLibrariesHeader.clickMoreActions();
+ expect(await libraryMenu.isMenuItemVisible(removeFavoriteButton)).toBe(true);
+ await libraryMenu.clickMenuItem(removeFavoriteButton);
+ await myLibrariesHeader.clickMoreActions();
+ expect(await libraryMenu.isMenuItemVisible(favoriteButton)).toBe(true);
+ });
+
+ test('[C289988] Delete a library from My Libraries', async ({ trashPage }) => {
+ const trashTable = trashPage.dataTable;
+
+ await expect(libraryTable.getRowByName(user2Library5Delete)).toBeVisible();
+ await libraryTable.getRowByName(user2Library5Delete).click();
+ await myLibrariesHeader.clickMoreActions();
+ await libraryMenu.clickMenuItem(deleteButton);
+ await expect.soft(snackBar.getByMessageLocator(libraryDeletedMessage)).toBeVisible();
+ await expect(libraryTable.getRowByName(user2Library5Delete)).not.toBeVisible();
+ await trashPage.navigate({ waitUntil: loadString });
+ await expect(trashTable.getRowByName(user2Library5Delete)).toBeVisible();
+ });
+ });
+
+ test.describe('Favorite Libraries page', () => {
+ let libraryTable: DataTableComponent;
+ let snackBar: SnackBarComponent;
+ let favoritesApi: FavoritesPageApi;
+
+ test.beforeEach(async ({ favoriteLibrariesPage }) => {
+ try {
+ libraryTable = favoriteLibrariesPage.dataTable;
+ snackBar = favoriteLibrariesPage.snackBar;
+ favoritesApi = await FavoritesPageApi.initialize(username2, username2);
+ } catch (error) {
+ console.error(`beforeAll failed : ${error}`);
+ }
+ });
+
+ test('[C290105] Join a public library from Favorite Libraries', async ({ favoriteLibrariesPage }) => {
+ await favoritesApi.addFavoriteById(siteString, adminLibrary1);
+ await favoriteLibrariesPage.navigate();
+ await libraryTable.performActionFromExpandableMenu(adminLibrary1, joinButton);
+ await expect.soft(snackBar.getByMessageLocator(libraryJoinedMessage)).toBeVisible();
+ await expect(libraryTable.getCellByColumnNameAndRowItem(adminLibrary1, consumerRole)).toBeVisible();
+ });
+
+ test('[C290109] Join a moderated library from Favorite Libraries', async ({ favoriteLibrariesPage }) => {
+ await favoritesApi.addFavoriteById(siteString, adminModerateLibrary1);
+ await favoriteLibrariesPage.navigate();
+ await expect(libraryTable.getCellByColumnNameAndRowItem(adminModerateLibrary1, notMemberString)).toBeVisible();
+ await libraryTable.performActionFromExpandableMenu(adminModerateLibrary1, joinButton);
+ await expect.soft(snackBar.getByMessageLocator(requestToJoinMessage)).toBeVisible();
+ await expect(libraryTable.getCellByColumnNameAndRowItem(adminModerateLibrary1, notMemberString)).toBeVisible();
+ await adminSitesApi.approveSiteMembershipRequest(adminModerateLibrary1, username2);
+ await favoriteLibrariesPage.navigate();
+ await expect(libraryTable.getCellByColumnNameAndRowItem(adminModerateLibrary1, consumerRole)).toBeVisible();
+ });
+
+ test('[C290110] Leave a library from Favorite Libraries', async ({ favoriteLibrariesPage }) => {
+ const confirmDialog = favoriteLibrariesPage.confirmDialogComponent;
+ await favoritesApi.addFavoriteById(siteString, user1Library2);
+ await favoriteLibrariesPage.navigate();
+ await expect(libraryTable.getCellByColumnNameAndRowItem(user1Library2, contributorRole)).toBeVisible();
+ await libraryTable.performActionFromExpandableMenu(user1Library2, leaveLibraryButton);
+ await confirmDialog.okButton.click();
+ await expect.soft(snackBar.getByMessageLocator(leftMessage)).toBeVisible();
+ await expect(libraryTable.getCellByColumnNameAndRowItem(user1Library2, notMemberString)).toBeVisible();
+ });
+
+ test('[C290108] Cancel join from Favorite Libraries', async ({ favoriteLibrariesPage }) => {
+ await user2SitesApi.createSiteMembershipRequestForPerson(username2, adminModerateLibrary3);
+ await favoritesApi.addFavoriteById(siteString, adminModerateLibrary3);
+ await favoriteLibrariesPage.navigate();
+
+ await expect(libraryTable.getCellByColumnNameAndRowItem(adminModerateLibrary3, notMemberString)).toBeVisible();
+ await libraryTable.performActionFromExpandableMenu(adminModerateLibrary3, cancelJoinRequestButton);
+ await expect.soft(snackBar.getByMessageLocator(cancelJoinRequestMessage)).toBeVisible();
+ const hasJoinRequest = await user2SitesApi.hasMembershipRequest(username2, adminModerateLibrary3);
+ expect(hasJoinRequest).toBe(false);
+ });
+
+ test('[C289976] Remove library from favorites from Favorite Libraries', async ({ favoriteLibrariesPage }) => {
+ const myLibrariesHeader = favoriteLibrariesPage.acaHeader;
+ const libraryMenu = favoriteLibrariesPage.matMenu;
+
+ await favoriteLibrariesPage.navigate({ waitUntil: domContentLoadedString });
+ await expect(libraryTable.getRowByName(user2Library3)).toBeVisible();
+ await libraryTable.getRowByName(user2Library3).click();
+ await myLibrariesHeader.clickMoreActions();
+ await libraryMenu.clickMenuItem(removeFavoriteButton);
+ await expect(libraryTable.getRowByName(user2Library3)).not.toBeVisible();
+ });
+
+ test('[C289991] Delete a library from Favorite Libraries', async ({ favoriteLibrariesPage, trashPage }) => {
+ const myLibrariesHeader = favoriteLibrariesPage.acaHeader;
+ const libraryMenu = favoriteLibrariesPage.matMenu;
+ const trashTable = trashPage.dataTable;
+
+ await favoriteLibrariesPage.navigate();
+ await expect(libraryTable.getRowByName(user2Library6Delete)).toBeVisible();
+ await libraryTable.getRowByName(user2Library6Delete).click();
+ await myLibrariesHeader.clickMoreActions();
+ await libraryMenu.clickMenuItem(deleteButton);
+ await expect.soft(snackBar.getByMessageLocator(libraryDeletedMessage)).toBeVisible();
+ await expect(libraryTable.getRowByName(user2Library6Delete)).not.toBeVisible();
+ await trashPage.navigate({ waitUntil: loadString });
+ await expect(trashTable.getRowByName(user2Library6Delete)).toBeVisible();
+ });
+ });
+
+ test.describe('Search Page', () => {
+ let libraryTable: DataTableComponent;
+ let snackBar: SnackBarComponent;
+
+ test.beforeEach(async ({ searchPage }) => {
+ try {
+ libraryTable = searchPage.dataTable;
+ snackBar = searchPage.snackBar;
+ } catch (error) {
+ console.error(`Search Page, beforeEach failed : ${error}`);
+ }
+ });
+
+ test('[C306959] Join a public library from Search Results', async ({ searchPage }) => {
+ await searchPage.navigate({ remoteUrl: `#/search-libraries;q=${adminLibrary2}` });
+ await searchPage.reload({ waitUntil: loadString });
+ await expect(libraryTable.getCellByColumnNameAndRowItem(adminLibrary2, notMemberString)).toBeVisible();
+ await libraryTable.performActionFromExpandableMenu(adminLibrary2, joinButton);
+ await expect.soft(snackBar.getByMessageLocator(libraryJoinedMessage)).toBeVisible();
+ await expect(libraryTable.getCellByColumnNameAndRowItem(adminLibrary2, consumerRole)).toBeVisible();
+ });
+
+ test('[C306960] Join a moderated library from Search Results', async ({ myLibrariesPage, searchPage }) => {
+ await searchPage.navigate({ remoteUrl: `#/search-libraries;q=${adminModerateLibrary2}` });
+ await expect(libraryTable.getCellByColumnNameAndRowItem(adminModerateLibrary2, notMemberString)).toBeVisible();
+ await libraryTable.performActionFromExpandableMenu(adminModerateLibrary2, joinButton);
+ await expect.soft(snackBar.getByMessageLocator(requestToJoinMessage)).toBeVisible();
+ await expect(libraryTable.getCellByColumnNameAndRowItem(adminModerateLibrary2, notMemberString)).toBeVisible();
+ await adminSitesApi.approveSiteMembershipRequest(adminModerateLibrary2, username2);
+ await myLibrariesPage.navigate();
+ await expect(libraryTable.getCellByColumnNameAndRowItem(adminModerateLibrary2, consumerRole)).toBeVisible();
+ });
+
+ test('[C306961] Leave a library from Search Results', async ({ searchPage }) => {
+ const confirmDialog = searchPage.confirmDialogComponent;
+ await searchPage.navigate({ remoteUrl: `#/search-libraries;q=${user1Library3}` });
+
+ await expect(libraryTable.getCellByColumnNameAndRowItem(user1Library3, 'Collaborator')).toBeVisible();
+ await libraryTable.performActionFromExpandableMenu(user1Library3, leaveLibraryButton);
+ await confirmDialog.okButton.click();
+ await expect.soft(snackBar.getByMessageLocator(leftMessage)).toBeVisible();
+ await expect(libraryTable.getCellByColumnNameAndRowItem(user1Library3, notMemberString)).toBeVisible();
+ });
+
+ test('[C306962] Cancel join from Search Results', async ({ searchPage }) => {
+ await user2SitesApi.createSiteMembershipRequestForPerson(username2, adminModerateLibrary4);
+ await searchPage.navigate({ remoteUrl: `#/search-libraries;q=${adminModerateLibrary4}` });
+ await searchPage.reload({ waitUntil: loadString });
+ await expect(libraryTable.getCellByColumnNameAndRowItem(adminModerateLibrary4, notMemberString)).toBeVisible();
+ await libraryTable.performActionFromExpandableMenu(adminModerateLibrary4, cancelJoinRequestButton);
+ await expect.soft(snackBar.getByMessageLocator(cancelJoinRequestMessage)).toBeVisible();
+ const hasJoinRequest = await user2SitesApi.hasMembershipRequest(username2, adminModerateLibrary4);
+ expect(hasJoinRequest).toBe(false);
+ });
+
+ test('[C306963] Mark library as favorite from Search Results', async ({ myLibrariesPage, searchPage }) => {
+ const myLibrariesHeader = myLibrariesPage.acaHeader;
+ const libraryMenu = myLibrariesPage.matMenu;
+
+ await myLibrariesHeader.searchButton.click();
+ await searchPage.searchInput.searchButton.click();
+ await searchPage.searchOverlay.searchLibrariesOption.click();
+ await searchPage.searchOverlay.searchFor(adminLibrary4);
+
+ await expect(libraryTable.getRowByName(adminLibrary4)).toBeVisible();
+ await libraryTable.getRowByName(adminLibrary4).click();
+ await myLibrariesHeader.clickMoreActions();
+ await libraryMenu.clickMenuItem(favoriteButton);
+ await myLibrariesHeader.clickMoreActions();
+ expect(await libraryMenu.isMenuItemVisible(removeFavoriteButton)).toBe(true);
+ });
+
+ test('[C306964] Remove library from favorites from Search Results', async ({ searchPage }) => {
+ const searchHeader = searchPage.acaHeader;
+ const libraryMenu = searchPage.matMenu;
+
+ await searchHeader.searchButton.click();
+ await searchPage.searchInput.searchButton.click();
+ await searchPage.searchOverlay.searchLibrariesOption.click();
+ await searchPage.searchOverlay.searchFor(user2Library4);
+
+ await expect(libraryTable.getRowByName(user2Library4)).toBeVisible();
+ await searchPage.reload({ waitUntil: domContentLoadedString });
+ await libraryTable.getRowByName(user2Library4).click();
+ await searchHeader.clickMoreActions();
+ await libraryMenu.clickMenuItem(removeFavoriteButton);
+ await searchHeader.clickMoreActions();
+ expect(await libraryMenu.isMenuItemVisible(favoriteButton)).toBe(true);
+ });
+
+ test('[C306965] Delete a library from Search Results', async ({ searchPage, trashPage }) => {
+ const searchHeader = searchPage.acaHeader;
+ const libraryMenu = searchPage.matMenu;
+ const trashTable = trashPage.dataTable;
+
+ await searchPage.navigate({ remoteUrl: `#/search-libraries;q=${user2Library7Delete}` });
+ await searchPage.reload({ waitUntil: loadString });
+ await expect(libraryTable.getRowByName(user2Library7Delete)).toBeVisible();
+ await libraryTable.getRowByName(user2Library7Delete).click();
+ await searchHeader.clickMoreActions();
+ await libraryMenu.clickMenuItem(deleteButton);
+ await expect.soft(snackBar.getByMessageLocator(libraryDeletedMessage)).toBeVisible();
+ await expect(libraryTable.getRowByName(user2Library7Delete)).not.toBeVisible();
+ await trashPage.navigate({ waitUntil: loadString });
+ await expect(trashTable.getRowByName(user2Library7Delete)).toBeVisible();
+ });
+ });
+});
diff --git a/e2e/playwright/pagination/.eslintrc.json b/e2e/playwright/pagination/.eslintrc.json
new file mode 100644
index 0000000000..9bacf995fe
--- /dev/null
+++ b/e2e/playwright/pagination/.eslintrc.json
@@ -0,0 +1,17 @@
+{
+ "extends": "../../../.eslintrc.json",
+ "ignorePatterns": ["!**/*"],
+ "overrides": [
+ {
+ "files": ["*.ts"],
+ "parserOptions": {
+ "project": ["e2e/playwright/pagination/tsconfig.e2e.json"],
+ "createDefaultProgram": true
+ },
+ "plugins": ["rxjs", "unicorn"],
+ "rules": {
+ "@typescript-eslint/no-floating-promises": "off"
+ }
+ }
+ ]
+}
diff --git a/e2e/playwright/pagination/exclude.tests.json b/e2e/playwright/pagination/exclude.tests.json
new file mode 100644
index 0000000000..0967ef424b
--- /dev/null
+++ b/e2e/playwright/pagination/exclude.tests.json
@@ -0,0 +1 @@
+{}
diff --git a/projects/aca-testing-shared/src/utilities/browser-utils.ts b/e2e/playwright/pagination/playwright.config.ts
similarity index 64%
rename from projects/aca-testing-shared/src/utilities/browser-utils.ts
rename to e2e/playwright/pagination/playwright.config.ts
index 0742e2f834..c6e0c03fc4 100644
--- a/projects/aca-testing-shared/src/utilities/browser-utils.ts
+++ b/e2e/playwright/pagination/playwright.config.ts
@@ -19,20 +19,26 @@
* 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 .
+ * from Hyland Software. If not, see .
*/
-import { browser } from 'protractor';
-import { USE_HASH_STRATEGY } from '../configs';
+import { PlaywrightTestConfig } from '@playwright/test';
+import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/playwright-shared';
+import EXCLUDED_JSON from './exclude.tests.json';
-export async function navigate(relativePath: string) {
- const path = [
- browser.baseUrl,
- browser.baseUrl.endsWith('/') ? '' : '/',
- USE_HASH_STRATEGY ? '#' : '',
- relativePath.startsWith('/') ? '' : '/',
- relativePath
- ].join('');
+const config: PlaywrightTestConfig = {
+ ...getGlobalConfig,
- return browser.get(path);
-}
+ grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Pagination'),
+ projects: [
+ {
+ name: 'Pagination',
+ testDir: './src/tests/',
+ use: {
+ users: ['hruser']
+ }
+ }
+ ]
+};
+
+export default config;
diff --git a/e2e/playwright/pagination/project.json b/e2e/playwright/pagination/project.json
new file mode 100644
index 0000000000..6d28ddc609
--- /dev/null
+++ b/e2e/playwright/pagination/project.json
@@ -0,0 +1,22 @@
+{
+ "name": "pagination-e2e",
+ "$schema": "../../../node_modules/nx/schemas/project-schema.json",
+ "sourceRoot": "e2e/playwright/pagination/src",
+ "projectType": "application",
+ "targets": {
+ "e2e": {
+ "executor": "nx:run-commands",
+ "options": {
+ "commands": ["npx playwright test --config=e2e/playwright/pagination/playwright.config.ts"]
+ },
+ "configurations": {
+ "production": {
+ "devServerTarget": "content-ce:serve:production"
+ }
+ }
+ },
+ "lint": {
+ "executor": "@angular-eslint/builder:lint"
+ }
+ }
+}
diff --git a/e2e/playwright/pagination/src/tests/favorites.ts b/e2e/playwright/pagination/src/tests/favorites.ts
new file mode 100644
index 0000000000..5205165abc
--- /dev/null
+++ b/e2e/playwright/pagination/src/tests/favorites.ts
@@ -0,0 +1,105 @@
+/*!
+ * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
+ *
+ * Alfresco Example Content Application
+ *
+ * This file is part of the Alfresco Example Content Application.
+ * 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:
+ *
+ * The Alfresco Example Content Application 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.
+ *
+ * The Alfresco Example Content Application 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
+ * from Hyland Software. If not, see .
+ */
+
+import { test } from '@alfresco/playwright-shared';
+import { expect } from '@playwright/test';
+
+export function favoritesTests(username: string) {
+ test.describe('Pagination controls : ', () => {
+ test.beforeEach(async ({ loginPage, favoritePage }) => {
+ await loginPage.navigate();
+ await loginPage.loginUser({ username: username, password: username });
+
+ await favoritePage.navigate();
+ await favoritePage.waitForPageLoad();
+ });
+
+ test('[C280113] Pagination control default values', async ({ favoritePage }) => {
+ expect(await favoritePage.pagination.getRange()).toContain('1-25 of 51');
+ expect(await favoritePage.pagination.getMaxItems()).toContain('25');
+ expect(await favoritePage.pagination.getCurrentPage()).toContain('Page 1');
+ expect(await favoritePage.pagination.getTotalPages()).toContain('of 3');
+ expect(await favoritePage.pagination.isPreviousEnabled()).toBe(false);
+ expect(await favoritePage.pagination.isNextEnabled()).toBe(true);
+ });
+
+ test('[C280114] Items per page values', async ({ favoritePage }) => {
+ await favoritePage.pagination.openMaxItemsMenu();
+ expect(await (await favoritePage.pagination.getNthItem(1)).innerText()).toBe('25');
+ expect(await (await favoritePage.pagination.getNthItem(2)).innerText()).toBe('50');
+ expect(await (await favoritePage.pagination.getNthItem(3)).innerText()).toBe('100');
+ await favoritePage.pagination.closeMenu();
+ });
+
+ test('[C280115] current page menu items', async ({ favoritePage }) => {
+ await favoritePage.pagination.openMaxItemsMenu();
+ await favoritePage.pagination.clickMenuItem('25');
+ expect(await favoritePage.pagination.getMaxItems()).toContain('25');
+ expect(await favoritePage.pagination.getTotalPages()).toContain('of 3');
+ expect(await favoritePage.pagination.getItemsCount()).toBe(3);
+ await favoritePage.pagination.closeMenu();
+
+ await favoritePage.pagination.openMaxItemsMenu();
+ await favoritePage.pagination.clickMenuItem('50');
+ expect(await favoritePage.pagination.getMaxItems()).toContain('50');
+ expect(await favoritePage.pagination.getTotalPages()).toContain('of 2');
+
+ await favoritePage.pagination.closeMenu();
+
+ await favoritePage.pagination.openMaxItemsMenu();
+ await favoritePage.pagination.clickMenuItem('100');
+ expect(await favoritePage.pagination.getMaxItems()).toContain('100');
+ expect(await favoritePage.pagination.getTotalPages()).toContain('of 1');
+
+ await favoritePage.pagination.resetToDefaultPageSize();
+ });
+
+ test('[C280116] change the current page from menu', async ({ favoritePage }) => {
+ await favoritePage.pagination.clickOnNextPage();
+ expect(await favoritePage.pagination.getRange()).toContain('Showing 26-50 of 51');
+ expect(await favoritePage.pagination.getCurrentPage()).toContain('Page 2');
+ expect(await favoritePage.pagination.isPreviousEnabled()).toBe(true);
+ expect(await favoritePage.pagination.isNextEnabled()).toBe(true);
+ await favoritePage.pagination.resetToDefaultPageSize();
+ });
+
+ test('[C280119] navigate to next and previous pages', async ({ favoritePage }) => {
+ await favoritePage.pagination.openMaxItemsMenu();
+ await favoritePage.pagination.clickMenuItem('25');
+ expect(await favoritePage.pagination.getMaxItems()).toContain('25');
+ await favoritePage.pagination.clickOnNextPage();
+ expect(await favoritePage.pagination.getRange()).toContain('Showing 26-50 of 51');
+
+ await favoritePage.pagination.clickOnPreviousPage();
+ expect(await favoritePage.pagination.getRange()).toContain('Showing 1-25 of 51');
+ });
+
+ test('[C280118] Next button is disabled on last page', async ({ favoritePage }) => {
+ await favoritePage.pagination.openMaxItemsMenu();
+ await favoritePage.pagination.clickNthItem(3);
+ expect(await favoritePage.pagination.getCurrentPage()).toContain('Page 1');
+ expect(await favoritePage.pagination.isNextEnabled()).toBe(false);
+ });
+ });
+}
diff --git a/e2e/playwright/pagination/src/tests/multiple-pages-files.spec.ts b/e2e/playwright/pagination/src/tests/multiple-pages-files.spec.ts
new file mode 100755
index 0000000000..431d57f551
--- /dev/null
+++ b/e2e/playwright/pagination/src/tests/multiple-pages-files.spec.ts
@@ -0,0 +1,72 @@
+/*!
+ * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
+ *
+ * Alfresco Example Content Application
+ *
+ * This file is part of the Alfresco Example Content Application.
+ * 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:
+ *
+ * The Alfresco Example Content Application 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.
+ *
+ * The Alfresco Example Content Application 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
+ * from Hyland Software. If not, see .
+ */
+
+import { ApiClientFactory, FavoritesPageApi, NodesApi, test, timeouts, Utils } from '@alfresco/playwright-shared';
+import { personalFilesTests } from './personal-files';
+import { favoritesTests } from './favorites';
+
+test.describe('Pagination on multiple pages : ', () => {
+ const random = Utils.random();
+ const username = `user-${random}`;
+
+ const parent = `parent-${random}`;
+ let parentId: string;
+ let initialFavoritesTotalItems: number;
+
+ const apiClientFactory = new ApiClientFactory();
+
+ test.beforeAll(async () => {
+ test.setTimeout(timeouts.extendedTest);
+ await apiClientFactory.setUpAcaBackend('admin');
+ await apiClientFactory.createUser({ username });
+ const nodesApi = await NodesApi.initialize(username, username);
+ const favoritesApi = await FavoritesPageApi.initialize(username, username);
+
+ const files = Array(51)
+ .fill('my-file')
+ .map((name, index): string => `${name}-${index + 1}-${random}.txt`);
+
+ parentId = (await nodesApi.createFolder(parent)).entry.id;
+ const filesIds = (await nodesApi.createFiles(files, parent)).list.entries.map((entries) => entries.entry.id);
+ initialFavoritesTotalItems = await favoritesApi.getFavoritesTotalItems(username);
+
+ await favoritesApi.addFavoritesByIds('file', filesIds);
+ });
+
+ test.afterAll(async () => {
+ await apiClientFactory.nodes.deleteNode(parentId, { permanent: true });
+ });
+
+ test.describe('on Personal Files', () => {
+ personalFilesTests(username, parent);
+ });
+
+ test.describe('on Favorites', () => {
+ test.beforeAll(async () => {
+ const favoritesApi = await FavoritesPageApi.initialize(username, username);
+ await favoritesApi.waitForApi(username, { expect: initialFavoritesTotalItems + 51 });
+ });
+ favoritesTests(username);
+ });
+});
diff --git a/e2e/playwright/pagination/src/tests/personal-files.ts b/e2e/playwright/pagination/src/tests/personal-files.ts
new file mode 100644
index 0000000000..c1b4d05c80
--- /dev/null
+++ b/e2e/playwright/pagination/src/tests/personal-files.ts
@@ -0,0 +1,107 @@
+/*!
+ * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
+ *
+ * Alfresco Example Content Application
+ *
+ * This file is part of the Alfresco Example Content Application.
+ * 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:
+ *
+ * The Alfresco Example Content Application 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.
+ *
+ * The Alfresco Example Content Application 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
+ * from Hyland Software. If not, see .
+ */
+
+import { test, timeouts } from '@alfresco/playwright-shared';
+import { expect } from '@playwright/test';
+
+export function personalFilesTests(userName: string, parentName: string) {
+ test.describe('Pagination controls : ', () => {
+ test.beforeEach(async ({ loginPage, personalFiles, page }) => {
+ await loginPage.navigate();
+ await loginPage.loginUser({ username: userName, password: userName });
+ await personalFiles.waitForPageLoad();
+ await personalFiles.dataTable.getRowByName(parentName).dblclick();
+ await page.waitForTimeout(timeouts.tiny);
+ });
+
+ test('[C280077] Pagination control default values', async ({ personalFiles }) => {
+ expect(await personalFiles.pagination.getRange()).toContain('Showing 1-25 of 51');
+ expect(await personalFiles.pagination.getMaxItems()).toContain('25');
+ expect(await personalFiles.pagination.getCurrentPage()).toContain('Page 1');
+ expect(await personalFiles.pagination.getTotalPages()).toContain('of 3');
+ expect(await personalFiles.pagination.isPreviousEnabled()).toBe(false);
+ expect(await personalFiles.pagination.isNextEnabled()).toBe(true);
+ });
+
+ test('[C280078] Items per page values', async ({ personalFiles }) => {
+ await personalFiles.pagination.openMaxItemsMenu();
+ expect(await (await personalFiles.pagination.getNthItem(1)).innerText()).toBe('25');
+ expect(await (await personalFiles.pagination.getNthItem(2)).innerText()).toBe('50');
+ expect(await (await personalFiles.pagination.getNthItem(3)).innerText()).toBe('100');
+ await personalFiles.closeMenu();
+ });
+
+ test('[C280079] current page menu items', async ({ personalFiles }) => {
+ await personalFiles.pagination.openMaxItemsMenu();
+ await personalFiles.pagination.clickMenuItem('25');
+ expect(await personalFiles.pagination.getMaxItems()).toContain('25');
+ expect(await personalFiles.pagination.getTotalPages()).toContain('of 3');
+ expect(await personalFiles.pagination.getItemsCount()).toBe(3);
+
+ await personalFiles.pagination.openMaxItemsMenu();
+ await personalFiles.pagination.clickMenuItem('50');
+ expect(await personalFiles.pagination.getMaxItems()).toContain('50');
+ expect(await personalFiles.pagination.getTotalPages()).toContain('of 2');
+
+ await personalFiles.pagination.openMaxItemsMenu();
+ await personalFiles.pagination.clickMenuItem('100');
+ expect(await personalFiles.pagination.getMaxItems()).toContain('100');
+ expect(await personalFiles.pagination.getTotalPages()).toContain('of 1');
+
+ await personalFiles.pagination.resetToDefaultPageSize();
+ });
+
+ test('[C280080] change the current page from menu', async ({ personalFiles }) => {
+ await personalFiles.pagination.clickOnNextPage();
+ expect(await personalFiles.pagination.getRange()).toContain('Showing 26-50 of 51');
+ expect(await personalFiles.pagination.getCurrentPage()).toContain('Page 2');
+ expect(await personalFiles.pagination.isPreviousEnabled()).toBe(true);
+ expect(await personalFiles.pagination.isNextEnabled()).toBe(true);
+ await personalFiles.pagination.resetToDefaultPageSize();
+ });
+
+ test('[C280083] navigate to next and previous pages', async ({ personalFiles }) => {
+ await personalFiles.pagination.openMaxItemsMenu();
+ await personalFiles.pagination.clickMenuItem('25');
+ expect(await personalFiles.pagination.getMaxItems()).toContain('25');
+ await personalFiles.pagination.clickOnNextPage();
+ expect(await personalFiles.pagination.getRange()).toContain('Showing 26-50 of 51');
+
+ await personalFiles.pagination.clickOnPreviousPage();
+ expect(await personalFiles.pagination.getRange()).toContain('Showing 1-25 of 51');
+ });
+
+ test('[C280081] Previous button is disabled on first page', async ({ personalFiles }) => {
+ expect(await personalFiles.pagination.getCurrentPage()).toContain('Page 1');
+ expect(await personalFiles.pagination.isPreviousEnabled()).toBe(false);
+ });
+
+ test('[C280082] Next button is disabled on last page', async ({ personalFiles }) => {
+ await personalFiles.pagination.openMaxItemsMenu();
+ await personalFiles.pagination.clickNthItem(3);
+ expect(await personalFiles.pagination.getCurrentPage()).toContain('Page 1');
+ expect(await personalFiles.pagination.isNextEnabled()).toBe(false);
+ });
+ });
+}
diff --git a/e2e/playwright/pagination/tsconfig.e2e.adf.json b/e2e/playwright/pagination/tsconfig.e2e.adf.json
new file mode 100644
index 0000000000..87cbcf775a
--- /dev/null
+++ b/e2e/playwright/pagination/tsconfig.e2e.adf.json
@@ -0,0 +1,15 @@
+{
+ "extends": "../../../tsconfig.adf.json",
+ "compilerOptions": {
+ "outDir": "../../out-tsc/e2e",
+ "baseUrl": "./",
+ "module": "commonjs",
+ "target": "es2017",
+ "types": ["jasmine", "jasminewd2", "node"],
+ "skipLibCheck": true,
+ "paths": {
+ "@alfresco/playwright-shared": ["../../../projects/aca-playwright-shared/src/index.ts"]
+ }
+ },
+ "exclude": ["node_modules"]
+}
diff --git a/e2e/playwright/pagination/tsconfig.e2e.json b/e2e/playwright/pagination/tsconfig.e2e.json
new file mode 100755
index 0000000000..c317985239
--- /dev/null
+++ b/e2e/playwright/pagination/tsconfig.e2e.json
@@ -0,0 +1,15 @@
+{
+ "extends": "../../../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../../out-tsc/e2e",
+ "baseUrl": "./",
+ "module": "commonjs",
+ "target": "es2017",
+ "types": ["jasmine", "jasminewd2", "node", "@playwright/test"],
+ "skipLibCheck": true,
+ "paths": {
+ "@alfresco/playwright-shared": ["../../../projects/aca-playwright-shared/src/index.ts"]
+ }
+ },
+ "exclude": ["node_modules"]
+}
diff --git a/e2e/playwright/special-permissions-actions-available/src/tests/folders-actions.spec.ts b/e2e/playwright/special-permissions-actions-available/src/tests/folders-actions.spec.ts
new file mode 100644
index 0000000000..fc636d25cd
--- /dev/null
+++ b/e2e/playwright/special-permissions-actions-available/src/tests/folders-actions.spec.ts
@@ -0,0 +1,117 @@
+/*!
+ * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
+ *
+ * Alfresco Example Content Application
+ *
+ * This file is part of the Alfresco Example Content Application.
+ * 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:
+ *
+ * The Alfresco Example Content Application 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.
+ *
+ * The Alfresco Example Content Application 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
+ * from Hyland Software. If not, see .
+ */
+
+import { ApiClientFactory, FavoritesPageApi, PersonalFilesPage, NodesApi, TrashcanApi, Utils, test, timeouts } from '@alfresco/playwright-shared';
+import * as testData from '@alfresco/playwright-shared';
+
+test.describe('Folders - available actions : ', () => {
+ const username = `user-${Utils.random()}`;
+ let parentId: string;
+ let nodesApi: NodesApi;
+ let trashCanActions: TrashcanApi;
+
+ async function checkActionsAvailable(
+ myPersonalFiles: PersonalFilesPage,
+ item: string,
+ expectedToolbarPrimary: string[],
+ expectedToolbarMore: string[]
+ ): Promise {
+ await myPersonalFiles.dataTable.selectItem(item);
+ await myPersonalFiles.acaHeader.verifyToolbarPrimaryActions(expectedToolbarPrimary);
+ await myPersonalFiles.acaHeader.clickMoreActions();
+ await myPersonalFiles.matMenu.verifyActualMoreActions(expectedToolbarMore);
+ }
+
+ async function checkMultipleSelActionsAvailable(
+ myPersonalFiles: PersonalFilesPage,
+ expectedToolbarPrimary: string[],
+ expectedToolbarMore: string[]
+ ): Promise {
+ await myPersonalFiles.acaHeader.verifyToolbarPrimaryActions(expectedToolbarPrimary);
+ await myPersonalFiles.acaHeader.clickMoreActions();
+ await myPersonalFiles.matMenu.verifyActualMoreActions(expectedToolbarMore);
+ }
+
+ test.beforeAll(async () => {
+ test.setTimeout(timeouts.extendedTest);
+ const apiClientFactory = new ApiClientFactory();
+ const parentName = `parent-${Utils.random()}`;
+ await apiClientFactory.setUpAcaBackend('admin');
+ await apiClientFactory.createUser({ username });
+ nodesApi = await NodesApi.initialize(username, username);
+ const favoritesActions = await FavoritesPageApi.initialize(username, username);
+ trashCanActions = await TrashcanApi.initialize(username, username);
+ parentId = (await nodesApi.createFolder(parentName)).entry.id;
+ await nodesApi.createFile(testData.file.name, parentId);
+ await nodesApi.createFolder(testData.folderFile.name, parentId);
+ const folderFavId = (await nodesApi.createFolder(testData.folderFavFile.name, parentId)).entry.id;
+ const initialFavoritesTotalItems = (await favoritesActions.getFavoritesTotalItems(username)) || 0;
+ await favoritesActions.addFavoritesByIds('folder', [folderFavId]);
+ await favoritesActions.waitForApi(username, { expect: initialFavoritesTotalItems + 1 });
+ });
+
+ test.afterAll(async () => {
+ await nodesApi.deleteNodes([parentId]);
+ await trashCanActions.emptyTrashcan();
+ });
+
+ test.describe('on Personal Files : ', () => {
+ test.beforeEach(async ({ personalFiles, loginPage }) => {
+ await personalFiles.navigate({ remoteUrl: `#/personal-files/${parentId}` });
+ await loginPage.loginUser({ username, password: username });
+ });
+
+ test('Folder not favorite - [C213123]', async ({ personalFiles }) => {
+ await personalFiles.dataTable.getRowByName(testData.folderFile.name).click({ button: 'right' });
+ await personalFiles.matMenu.verifyActualMoreActions(testData.folderFile.contextMenu);
+ await checkActionsAvailable(personalFiles, testData.folderFile.name, testData.folderFile.toolbarPrimary, testData.folderFile.toolbarMore);
+ });
+
+ test('Folder favorite - [C280451]', async ({ personalFiles }) => {
+ await personalFiles.dataTable.getRowByName(testData.folderFavFile.name).click({ button: 'right' });
+ await personalFiles.matMenu.verifyActualMoreActions(testData.folderFavFile.contextMenu);
+ await checkActionsAvailable(
+ personalFiles,
+ testData.folderFavFile.name,
+ testData.folderFavFile.toolbarPrimary,
+ testData.folderFavFile.toolbarMore
+ );
+ });
+
+ test('multiple folders - [C280459]', async ({ personalFiles }) => {
+ await personalFiles.dataTable.selectMultiItem(testData.folderFavFile.name, testData.folderFile.name);
+ await personalFiles.dataTable.getRowByName(testData.folderFavFile.name).click({ button: 'right' });
+ await personalFiles.matMenu.verifyActualMoreActions(testData.multipleSelFile.contextMenu);
+ await personalFiles.dataTable.selectMultiItem(testData.folderFavFile.name, testData.folderFile.name);
+ await checkMultipleSelActionsAvailable(personalFiles, testData.multipleSelFile.toolbarPrimary, testData.multipleSelFile.toolbarMore);
+ });
+
+ test('both files and folders - [C280460]', async ({ personalFiles }) => {
+ await personalFiles.dataTable.selectMultiItem(testData.file.name, testData.folderFile.name);
+ await personalFiles.dataTable.getRowByName(testData.folderFile.name).click({ button: 'right' });
+ await personalFiles.matMenu.verifyActualMoreActions(testData.multipleSelFile.contextMenu);
+ await checkMultipleSelActionsAvailable(personalFiles, testData.multipleSelFile.toolbarPrimary, testData.multipleSelFile.toolbarMore);
+ });
+ });
+});
diff --git a/e2e/playwright/special-permissions-actions-available/src/tests/special-permissions-actions.test.ts b/e2e/playwright/special-permissions-actions-available/src/tests/special-permissions-actions.test.ts
index e072108cd7..c2dc09a421 100644
--- a/e2e/playwright/special-permissions-actions-available/src/tests/special-permissions-actions.test.ts
+++ b/e2e/playwright/special-permissions-actions-available/src/tests/special-permissions-actions.test.ts
@@ -34,7 +34,8 @@ import {
SitesApi,
test,
SharedLinksApi,
- SearchPageApi
+ SearchPageApi,
+ timeouts
} from '@alfresco/playwright-shared';
import { Site } from '@alfresco/js-api';
@@ -79,7 +80,7 @@ test.describe('Special permissions : ', () => {
let managerSearchActions: SearchPageApi;
test.beforeAll(async () => {
- test.setTimeout(140000);
+ test.setTimeout(timeouts.extendedTest);
await apiClientFactory.setUpAcaBackend('admin');
await apiClientFactory.createUser({ username: userManager });
await apiClientFactory.createUser({ username: userConsumer });
diff --git a/e2e/protractor/suites/actions-available/files-folders/folders-actions.test.ts b/e2e/protractor/suites/actions-available/files-folders/folders-actions.test.ts
deleted file mode 100755
index 344cfcf1c4..0000000000
--- a/e2e/protractor/suites/actions-available/files-folders/folders-actions.test.ts
+++ /dev/null
@@ -1,202 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { RepoClient, Utils, AdminActions, UserActions, LoginPage, SearchResultsPage, BrowsingPage } from '@alfresco/aca-testing-shared';
-import * as testData from './test-data';
-import * as testUtil from '../test-util';
-
-describe('Folders - available actions : ', () => {
- const random = testData.random;
-
- const username = `user-${Utils.random()}`;
- const parentName = `parent-${Utils.random()}`;
-
- let parentId: string;
- let folderFavId: string;
- let folderFav2Id: string;
- let fileFavId: string;
-
- const userApi = new RepoClient(username, username);
- const adminApiActions = new AdminActions();
- const userActions = new UserActions();
-
- const loginPage = new LoginPage();
- const page = new BrowsingPage();
- const { dataTable, toolbar } = page;
- const { searchInput } = page.pageLayoutHeader;
- const searchResultsPage = new SearchResultsPage();
-
- beforeAll(async () => {
- await adminApiActions.createUser({ username });
-
- parentId = await userApi.createFolder(parentName);
-
- await userApi.createFile(testData.file.name, parentId);
- fileFavId = await userApi.createFile(testData.fileFav.name, parentId);
-
- await userApi.createFolder(testData.folder.name, parentId);
- folderFavId = await userApi.createFolder(testData.folderFav.name, parentId);
- folderFav2Id = await userApi.createFolder(testData.folderFav2.name, parentId);
-
- const initialFavoritesTotalItems = (await userApi.favorites.getFavoritesTotalItems()) || 0;
- await userApi.favorites.addFavoritesByIds('folder', [folderFavId, folderFav2Id]);
- await userApi.favorites.addFavoritesByIds('file', [fileFavId]);
- await userApi.favorites.waitForApi({ expect: initialFavoritesTotalItems + 3 });
- await userApi.search.waitForNodes(random, { expect: 5 });
-
- await loginPage.loginWith(username);
- });
-
- afterAll(async () => {
- await userActions.login(username, username);
- await userActions.deleteNodes([parentId]);
- await userActions.emptyTrashcan();
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- describe('on Personal Files : ', () => {
- beforeAll(async () => {
- await page.clickPersonalFilesAndWait();
- await dataTable.doubleClickOnRowByName(parentName);
- await dataTable.waitForHeader();
- });
-
- it('Folder not favorite - [C213123]', async () => {
- await testUtil.checkToolbarActions(testData.folder.name, testData.folder.toolbarPrimary, testData.folder.toolbarMore);
- await testUtil.checkContextMenu(testData.folder.name, testData.folder.contextMenu);
- });
-
- it('Folder favorite - [C280451]', async () => {
- await testUtil.checkToolbarActions(testData.folderFav.name, testData.folderFav.toolbarPrimary, testData.folderFav.toolbarMore);
- await testUtil.checkContextMenu(testData.folderFav.name, testData.folderFav.contextMenu);
- });
-
- it('multiple folders - [C280459]', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.folderFav.name, testData.folder.name], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.folderFav.name, testData.folder.name],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSel.toolbarMore
- );
- });
-
- it('both files and folders - [C280460]', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.file.name, testData.folder.name], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.file.name, testData.folder.name],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSel.toolbarMore
- );
- });
- });
-
- describe('on Favorites Files : ', () => {
- beforeAll(async () => {
- await page.clickFavoritesAndWait();
- });
-
- it('Folder favorite - [C291817]', async () => {
- await testUtil.checkToolbarActions(testData.folderFav.name, testData.folderFav.toolbarPrimary, testData.folderFav.favoritesToolbarMore);
- await testUtil.checkContextMenu(testData.folderFav.name, testData.folderFav.favoritesContextMenu);
- });
-
- it('multiple folders - [C280664]', async () => {
- await testUtil.checkMultipleSelContextMenu(
- [testData.folderFav.name, testData.folderFav2.name],
- testData.multipleSelAllFav.favoritesContextMenu
- );
- await testUtil.checkMultipleSelToolbarActions(
- [testData.folderFav.name, testData.folderFav2.name],
- testData.multipleSelAllFav.toolbarPrimary,
- testData.multipleSelAllFav.favoritesToolbarMore
- );
- });
-
- it('both files and folders - [C280657]', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.fileFav.name, testData.folderFav.name], testData.multipleSelAllFav.favoritesContextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileFav.name, testData.folderFav.name],
- testData.multipleSelAllFav.toolbarPrimary,
- testData.multipleSelAllFav.favoritesToolbarMore
- );
- });
- });
-
- describe('on Search Results : ', () => {
- describe('on a folder', () => {
- beforeAll(async () => {
- await page.clickPersonalFiles();
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.searchFor(`*${random}`);
- await searchResultsPage.waitForResults();
- });
-
- it('[C280609] Folder not favorite', async () => {
- await testUtil.checkToolbarActions(testData.folder.name, testData.folder.searchToolbarPrimary, testData.folder.searchToolbarMore);
- await testUtil.checkContextMenu(testData.folder.name, testData.folder.searchContextMenu);
- });
-
- it('[C291828] Folder favorite', async () => {
- await testUtil.checkToolbarActions(testData.folderFav.name, testData.folderFav.searchToolbarPrimary, testData.folderFav.searchToolbarMore);
- await testUtil.checkContextMenu(testData.folderFav.name, testData.folderFav.searchContextMenu);
- });
- });
-
- describe('on multiple selection', () => {
- it('[C291821] multiple folders', async () => {
- await page.clickPersonalFiles();
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.searchFor(`*${random}`);
- await searchResultsPage.waitForResults();
-
- await testUtil.checkMultipleSelContextMenu([testData.folder.name, testData.folderFav.name], testData.multipleSel.searchContextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.folder.name, testData.folderFav.name],
- testData.multipleSel.searchToolbarPrimary,
- testData.multipleSel.searchToolbarMore
- );
- });
-
- it('[C291822] both files and folders', async () => {
- await page.clickPersonalFiles();
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.searchFor(`*${testData.file.name} or *${testData.folderFav.name}`);
- await searchResultsPage.waitForResults();
-
- await testUtil.checkMultipleSelContextMenu([testData.file.name, testData.folderFav.name], testData.multipleSel.searchContextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.file.name, testData.folderFav.name],
- testData.multipleSel.searchToolbarPrimary,
- testData.multipleSel.searchToolbarMore
- );
- });
- });
- });
-});
diff --git a/e2e/protractor/suites/actions-available/files-folders/generic.test.ts b/e2e/protractor/suites/actions-available/files-folders/generic.test.ts
deleted file mode 100755
index f822895877..0000000000
--- a/e2e/protractor/suites/actions-available/files-folders/generic.test.ts
+++ /dev/null
@@ -1,175 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { LoginPage, BrowsingPage, RepoClient, NodeContentTree, Utils, AdminActions } from '@alfresco/aca-testing-shared';
-import { BrowserActions } from '@alfresco/adf-testing';
-
-describe('Generic tests : ', () => {
- const random = Utils.random();
-
- const username = `user-${random}`;
-
- const parent = `parent-${random}`;
-
- const file1 = `file-${random}-1.txt`;
- const file2 = `file-${random}-2.txt`;
-
- const folder1 = `my-folder1-${random}`;
- const folder2 = `my-folder2-${random}`;
-
- const content: NodeContentTree = {
- name: parent,
- files: [file1, file2],
- folders: [folder1, folder2]
- };
-
- const userApi = new RepoClient(username, username);
-
- const adminApiActions = new AdminActions();
-
- const loginPage = new LoginPage();
- const page = new BrowsingPage();
- const { dataTable, toolbar } = page;
- const { searchInput } = page.pageLayoutHeader;
- const contextMenu = dataTable.menu;
-
- beforeAll(async () => {
- await adminApiActions.createUser({ username });
- await userApi.nodes.createContent(content);
- await loginPage.loginWith(username);
- });
-
- afterAll(async () => {
- await userApi.nodes.deleteNodeByPath(parent);
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- describe('single selection', () => {
- beforeEach(async () => {
- await page.clickPersonalFilesAndWait();
- await dataTable.doubleClickOnRowByName(parent);
- await dataTable.waitForHeader();
- });
-
- it('[C213134] selected row is marked with a check circle icon', async () => {
- await dataTable.selectItem(file1);
- expect(await dataTable.hasCheckMarkIcon(file1)).toBe(true, 'check mark missing');
- });
-
- it('[C286252] Row is marked with a check circle icon on direct right click', async () => {
- await dataTable.rightClickOnItem(file2);
- expect(await dataTable.hasCheckMarkIcon(file2)).toBe(true, 'check mark missing');
- });
-
- it('[C286253] Context menu appears on direct right click on an item', async () => {
- await dataTable.rightClickOnItem(file1);
- expect(await dataTable.hasContextMenu()).toBe(true, 'Context menu is not displayed');
- });
-
- it('[C286254] Context menu appears when selecting an item and then right clicking on it', async () => {
- await dataTable.selectItem(file2);
- await dataTable.rightClickOnItem(file2);
- expect(await dataTable.hasContextMenu()).toBe(true, 'Context menu is not displayed');
- });
-
- it('[C284666] Context menu appears correctly when right clicking on another item', async () => {
- await dataTable.selectItem(file1);
- await dataTable.rightClickOnItem(file2);
- expect(await dataTable.hasContextMenu()).toBe(true, `Context menu is not displayed`);
- expect(await dataTable.hasCheckMarkIcon(file2)).toBe(true, `${file2} is not selected`);
- expect(await dataTable.hasCheckMarkIcon(file1)).toBe(false, `${file1} is not selected`);
- });
-
- it('[C280619] Context menu closes when clicking away from it', async () => {
- await dataTable.rightClickOnItem(file1);
- expect(await dataTable.hasContextMenu()).toBe(true, 'Context menu is not displayed');
- await BrowserActions.click(page.breadcrumb.currentItem);
- expect(await dataTable.hasContextMenu()).toBe(false, 'Context menu is displayed');
- });
- });
-
- describe('Actions are not displayed when no item is selected', () => {
- it('[C291815] on Search Results', async () => {
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.searchFor('*');
-
- expect(await toolbar.isEmpty()).toEqual(true);
- });
- });
-
- describe('multiple selection', () => {
- beforeEach(async () => {
- await page.clickPersonalFilesAndWait();
- await dataTable.doubleClickOnRowByName(parent);
- await dataTable.waitForHeader();
- });
-
- it('[C286268] Context menu appears on right click on a multiple selection of items', async () => {
- await dataTable.selectMultipleItems([file1, file2]);
- await dataTable.rightClickOnMultipleSelection();
-
- expect(await dataTable.hasContextMenu()).toBe(true, 'Context menu is not displayed');
- });
-
- it('[C286269] Context menu appears when right clicking on a single item while having multiple items selected', async () => {
- await dataTable.selectMultipleItems([file2, folder1]);
- await dataTable.rightClickOnItem(file1);
-
- expect(await dataTable.hasContextMenu()).toBe(true, `Context menu is not displayed for ${file1}`);
- expect(await dataTable.getSelectedRowsCount()).toEqual(1, 'incorrect number of selected rows');
- expect(await contextMenu.editFolderAction.isPresent()).toBe(false, `Edit folder is displayed for ${file1}`);
- expect(await dataTable.hasCheckMarkIcon(file1)).toBe(true, `${file1} is not selected`);
- expect(await dataTable.hasCheckMarkIcon(file2)).toBe(false, `${file2} is selected`);
- expect(await dataTable.hasCheckMarkIcon(folder1)).toBe(false, `${folder1} is selected`);
- });
-
- it('[C280458] Unselect items with single click', async () => {
- await dataTable.selectMultipleItems([file1, file2, folder1, folder2]);
- expect(await dataTable.getSelectedRowsCount()).toEqual(4, 'incorrect selected rows number');
-
- await dataTable.clickItem(file1);
- expect(await dataTable.getSelectedRowsCount()).toEqual(1, 'incorrect selected rows number');
- });
-
- it('[C217110] Select / unselect items by CMD+click', async () => {
- await Utils.pressCmd();
- await dataTable.clickItem(file1);
- await dataTable.clickItem(file2);
- await dataTable.clickItem(folder1);
- await dataTable.clickItem(folder2);
- await Utils.releaseKeyPressed();
- expect(await dataTable.getSelectedRowsCount()).toEqual(4, 'incorrect selected rows number');
-
- await Utils.pressCmd();
- await dataTable.clickItem(file1);
- await dataTable.clickItem(file2);
- await Utils.releaseKeyPressed();
- expect(await dataTable.getSelectedRowsCount()).toEqual(2, 'incorrect selected rows number');
- });
- });
-});
diff --git a/e2e/protractor/suites/actions-available/files-folders/locked-files-actions.test.ts b/e2e/protractor/suites/actions-available/files-folders/locked-files-actions.test.ts
deleted file mode 100755
index a029b7440e..0000000000
--- a/e2e/protractor/suites/actions-available/files-folders/locked-files-actions.test.ts
+++ /dev/null
@@ -1,386 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { RepoClient, Utils, AdminActions, UserActions, LoginPage, BrowsingPage, SearchResultsPage } from '@alfresco/aca-testing-shared';
-import * as testData from './test-data';
-import * as testUtil from '../test-util';
-
-describe('Locked Files - available actions : ', () => {
- const random = testData.random;
-
- const username = `user-${Utils.random()}`;
- const parentName = `parent-${Utils.random()}`;
-
- let parentId: string;
- let fileLockedId: string;
- let fileFavLockedId: string;
- let fileSharedLockedId: string;
- let fileSharedFavLockedId: string;
-
- const userApi = new RepoClient(username, username);
- const adminApiActions = new AdminActions();
- const userActions = new UserActions();
-
- const loginPage = new LoginPage();
- const page = new BrowsingPage();
- const { dataTable, toolbar } = page;
- const { searchInput } = page.pageLayoutHeader;
- const searchResultsPage = new SearchResultsPage();
-
- beforeAll(async () => {
- await adminApiActions.createUser({ username });
- await userActions.login(username, username);
-
- parentId = await userApi.createFolder(parentName);
-
- fileLockedId = await userApi.createFile(testData.fileLocked.name, parentId);
- fileFavLockedId = await userApi.createFile(testData.fileFavLocked.name, parentId);
- fileSharedLockedId = await userApi.createFile(testData.fileSharedLocked.name, parentId);
- fileSharedFavLockedId = await userApi.createFile(testData.fileSharedFavLocked.name, parentId);
-
- const initialFavoritesTotalItems = (await userApi.favorites.getFavoritesTotalItems()) || 0;
- await userApi.favorites.addFavoritesByIds('file', [fileFavLockedId, fileSharedFavLockedId]);
- await userApi.favorites.waitForApi({ expect: initialFavoritesTotalItems + 2 });
-
- await userApi.shared.shareFilesByIds([fileSharedLockedId, fileSharedFavLockedId]);
-
- await userActions.lockNodes([fileLockedId, fileFavLockedId, fileSharedLockedId, fileSharedFavLockedId]);
-
- await userApi.shared.waitForFilesToBeShared([fileSharedLockedId, fileSharedFavLockedId]);
- await userApi.search.waitForApi(username, { expect: 4 });
-
- await loginPage.loginWith(username);
- });
-
- afterAll(async () => {
- await userActions.login(username, username);
- await userActions.deleteNodes([parentId]);
- await userActions.emptyTrashcan();
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- describe('on Personal Files : ', () => {
- beforeEach(async () => {
- await page.clickPersonalFilesAndWait();
- await dataTable.doubleClickOnRowByName(parentName);
- await dataTable.waitForHeader();
- });
-
- describe('single selection : ', () => {
- it('File locked - [C297617]', async () => {
- await testUtil.checkToolbarActions(testData.fileLocked.name, testData.fileLocked.toolbarPrimary, testData.fileLocked.toolbarMore);
- await testUtil.checkContextMenu(testData.fileLocked.name, testData.fileLocked.contextMenu);
- });
-
- it('File favorite, locked - [C291816]', async () => {
- await testUtil.checkToolbarActions(testData.fileFavLocked.name, testData.fileFavLocked.toolbarPrimary, testData.fileFavLocked.toolbarMore);
- await testUtil.checkContextMenu(testData.fileFavLocked.name, testData.fileFavLocked.contextMenu);
- });
-
- it('File shared, locked - [C280453]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedLocked.name,
- testData.fileSharedLocked.toolbarPrimary,
- testData.fileSharedLocked.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedLocked.name, testData.fileSharedLocked.contextMenu);
- });
-
- it('File shared, favorite, locked - [C280454]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.toolbarPrimary,
- testData.fileSharedFavLocked.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedFavLocked.name, testData.fileSharedFavLocked.contextMenu);
- });
- });
-
- describe('Viewer - file opened from Personal Files : ', () => {
- it('File locked - [C291832]', async () => {
- await testUtil.checkViewerActions(testData.fileLocked.name, testData.fileLocked.viewerToolbarPrimary, testData.fileLocked.viewerToolbarMore);
- });
-
- it('File favorite, locked - [C297593]', async () => {
- await testUtil.checkViewerActions(
- testData.fileFavLocked.name,
- testData.fileFavLocked.viewerToolbarPrimary,
- testData.fileFavLocked.viewerToolbarMore
- );
- });
-
- it('File shared, locked - [C291833]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedLocked.name,
- testData.fileSharedLocked.viewerToolbarPrimary,
- testData.fileSharedLocked.viewerToolbarMore
- );
- });
-
- it('File shared, favorite, locked - [C297592]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.viewerToolbarPrimary,
- testData.fileSharedFavLocked.viewerToolbarMore
- );
- });
- });
- });
-
- describe('on Favorites : ', () => {
- beforeEach(async () => {
- await page.clickFavoritesAndWait();
- });
-
- describe('single selection : ', () => {
- it('File favorite, locked - [C280463]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileFavLocked.name,
- testData.fileFavLocked.toolbarPrimary,
- testData.fileFavLocked.favoritesToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileFavLocked.name, testData.fileFavLocked.favoritesContextMenu);
- });
-
- it('File shared, favorite, locked - [C280469]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.favoritesToolbarPrimary,
- testData.fileSharedFavLocked.favoritesToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedFavLocked.name, testData.fileSharedFavLocked.favoritesContextMenu);
- });
- });
-
- describe('Viewer - file opened from Favorites : ', () => {
- it('File favorite, locked - [C326707]', async () => {
- await testUtil.checkViewerActions(
- testData.fileFavLocked.name,
- testData.fileFavLocked.viewerToolbarPrimary,
- testData.fileFavLocked.viewerToolbarMore
- );
- });
-
- it('File shared, favorite, locked - [C326706]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.viewerToolbarPrimary,
- testData.fileSharedFavLocked.viewerToolbarMore
- );
- });
- });
- });
-
- describe('on Recent Files : ', () => {
- beforeEach(async () => {
- await page.clickRecentFilesAndWait();
- });
-
- describe('single selection : ', () => {
- it('File locked - [C280622]', async () => {
- await testUtil.checkToolbarActions(testData.fileLocked.name, testData.fileLocked.toolbarPrimary, testData.fileLocked.toolbarMore);
- await testUtil.checkContextMenu(testData.fileLocked.name, testData.fileLocked.contextMenu);
- });
-
- it('File favorite, locked - [C280608]', async () => {
- await testUtil.checkToolbarActions(testData.fileFavLocked.name, testData.fileFavLocked.toolbarPrimary, testData.fileFavLocked.toolbarMore);
- await testUtil.checkContextMenu(testData.fileFavLocked.name, testData.fileFavLocked.contextMenu);
- });
-
- it('File shared, locked - [C297636]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedLocked.name,
- testData.fileSharedLocked.toolbarPrimary,
- testData.fileSharedLocked.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedLocked.name, testData.fileSharedLocked.contextMenu);
- });
-
- it('File shared, favorite, locked - [C286324]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.toolbarPrimary,
- testData.fileSharedFavLocked.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedFavLocked.name, testData.fileSharedFavLocked.contextMenu);
- });
- });
-
- describe('Viewer - file opened from Recent Files : ', () => {
- it('File locked - [C326698]', async () => {
- await testUtil.checkViewerActions(testData.fileLocked.name, testData.fileLocked.viewerToolbarPrimary, testData.fileLocked.viewerToolbarMore);
- });
-
- it('File favorite, locked - [C326701]', async () => {
- await testUtil.checkViewerActions(
- testData.fileFavLocked.name,
- testData.fileFavLocked.viewerToolbarPrimary,
- testData.fileFavLocked.viewerToolbarMore
- );
- });
-
- it('File shared, locked - [C326699]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedLocked.name,
- testData.fileSharedLocked.viewerToolbarPrimary,
- testData.fileSharedLocked.viewerToolbarMore
- );
- });
-
- it('File shared, favorite, locked - [C326700]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.viewerToolbarPrimary,
- testData.fileSharedFavLocked.viewerToolbarMore
- );
- });
- });
- });
-
- describe('on Search Results : ', () => {
- beforeEach(async () => {
- await page.clickPersonalFiles();
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkOnlyFiles();
- await searchInput.searchFor(`*${random}`);
- await searchResultsPage.waitForResults();
- });
-
- describe('single selection : ', () => {
- it('[C297628] File locked', async () => {
- await testUtil.checkToolbarActions(testData.fileLocked.name, testData.fileLocked.searchToolbarPrimary, testData.fileLocked.searchToolbarMore);
- await testUtil.checkContextMenu(testData.fileLocked.name, testData.fileLocked.searchContextMenu);
- });
-
- it('[C280648] File favorite, locked', async () => {
- await testUtil.checkToolbarActions(
- testData.fileFavLocked.name,
- testData.fileFavLocked.searchToolbarPrimary,
- testData.fileFavLocked.searchToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileFavLocked.name, testData.fileFavLocked.searchContextMenu);
- });
-
- it('[C280574] File shared, locked', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedLocked.name,
- testData.fileSharedLocked.searchToolbarPrimary,
- testData.fileSharedLocked.searchToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedLocked.name, testData.fileSharedLocked.searchContextMenu);
- });
-
- it('[C280642] File shared, favorite, locked', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.searchToolbarPrimary,
- testData.fileSharedFavLocked.searchToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedFavLocked.name, testData.fileSharedFavLocked.searchContextMenu);
- });
- });
-
- describe('Viewer - file opened from Search Results : ', () => {
- it('File locked - [C326722]', async () => {
- await testUtil.checkViewerActions(
- testData.fileLocked.name,
- testData.fileLocked.viewerToolbarPrimary,
- testData.fileLocked.searchViewerToolbarMore
- );
- });
-
- it('File favorite, locked - [C326725]', async () => {
- await testUtil.checkViewerActions(
- testData.fileFavLocked.name,
- testData.fileFavLocked.viewerToolbarPrimary,
- testData.fileFavLocked.searchViewerToolbarMore
- );
- });
-
- it('File shared, locked - [C326723]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedLocked.name,
- testData.fileSharedLocked.viewerToolbarPrimary,
- testData.fileSharedLocked.searchViewerToolbarMore
- );
- });
-
- it('File shared, favorite, locked - [C326724]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.viewerToolbarPrimary,
- testData.fileSharedFavLocked.searchViewerToolbarMore
- );
- });
- });
- });
-
- describe('on Shared Files : ', () => {
- beforeEach(async () => {
- await page.clickSharedFilesAndWait();
- });
-
- describe('single selection : ', () => {
- it('File shared, locked - [C286274]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedLocked.name,
- testData.fileSharedLocked.toolbarPrimary,
- testData.fileSharedLocked.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedLocked.name, testData.fileSharedLocked.contextMenu);
- });
-
- it('File shared, favorite, locked - [C286275]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.toolbarPrimary,
- testData.fileSharedFavLocked.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedFavLocked.name, testData.fileSharedFavLocked.contextMenu);
- });
- });
-
- describe('Viewer - file opened from Shared Files : ', () => {
- it('File shared, locked - [C326712]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedLocked.name,
- testData.fileSharedLocked.viewerToolbarPrimary,
- testData.fileSharedLocked.viewerToolbarMore
- );
- });
-
- it('File shared, favorite, locked - [C326713]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.viewerToolbarPrimary,
- testData.fileSharedFavLocked.viewerToolbarMore
- );
- });
- });
- });
-});
diff --git a/e2e/protractor/suites/actions-available/files-folders/multiple-files-actions.test.ts b/e2e/protractor/suites/actions-available/files-folders/multiple-files-actions.test.ts
deleted file mode 100755
index c07ceb23fd..0000000000
--- a/e2e/protractor/suites/actions-available/files-folders/multiple-files-actions.test.ts
+++ /dev/null
@@ -1,228 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { RepoClient, Utils, AdminActions, UserActions, LoginPage, BrowsingPage, SearchResultsPage } from '@alfresco/aca-testing-shared';
-import * as testData from './test-data';
-import * as testUtil from '../test-util';
-
-describe('Multiple Files - available actions : ', () => {
- const random = Utils.random();
-
- const username = `user-${random}`;
-
- const parentName = `parent-${random}`;
- let parentId: string;
-
- const file1 = `file-1-${random}.txt`;
- let file1Id: string;
- const file2 = `file-2-${random}.txt`;
- let file2Id: string;
- const file3Locked = `file-3-locked-${random}.txt`;
- let file3LockedId: string;
- const file1LockedFav = `file-lockedFav1-${random}.txt`;
- let file1LockedFavId: string;
- const file2LockedFav = `file-lockedFav2-${random}.txt`;
- let file2LockedFavId: string;
-
- const userApi = new RepoClient(username, username);
- const adminApiActions = new AdminActions();
- const userActions = new UserActions();
-
- const loginPage = new LoginPage();
- const page = new BrowsingPage();
- const { dataTable, toolbar } = page;
- const { searchInput } = page.pageLayoutHeader;
- const searchResultsPage = new SearchResultsPage();
-
- beforeAll(async () => {
- await adminApiActions.createUser({ username });
- await userActions.login(username, username);
-
- parentId = await userApi.createFolder(parentName);
-
- file1Id = await userApi.createFile(file1, parentId);
- file2Id = await userApi.createFile(file2, parentId);
- file3LockedId = await userApi.createFile(file3Locked, parentId);
- file1LockedFavId = await userApi.createFile(file1LockedFav, parentId);
- file2LockedFavId = await userApi.createFile(file2LockedFav, parentId);
-
- await userActions.lockNodes([file1LockedFavId, file2LockedFavId, file3LockedId]);
-
- const initialFavoritesTotalItems = (await userApi.favorites.getFavoritesTotalItems()) || 0;
- await userApi.favorites.addFavoritesByIds('file', [file1LockedFavId, file2LockedFavId]);
- await userApi.favorites.waitForApi({ expect: initialFavoritesTotalItems + 2 });
-
- await userApi.shared.shareFilesByIds([file1Id, file2Id, file3LockedId, file1LockedFavId, file2LockedFavId]);
- await userApi.shared.waitForFilesToBeShared([file1Id, file2Id, file3LockedId, file1LockedFavId, file2LockedFavId]);
- await userApi.search.waitForApi(username, { expect: 5 });
-
- await loginPage.loginWith(username);
- });
-
- afterAll(async () => {
- await userActions.login(username, username);
- await userActions.unlockNodes([file1LockedFavId, file2LockedFavId, file3LockedId]);
- await userActions.deleteNodes([parentId]);
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- describe('on Personal Files : ', () => {
- beforeEach(async () => {
- await page.clickPersonalFilesAndWait();
- await dataTable.doubleClickOnRowByName(parentName);
- await dataTable.waitForHeader();
- });
-
- it('multiple files - [C217112]', async () => {
- await testUtil.checkMultipleSelContextMenu([file1, file2], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions([file1, file2], testData.multipleSel.toolbarPrimary, testData.multipleSel.toolbarMore);
- });
-
- it('multiple files - all favorite, locked - [C297619]', async () => {
- await testUtil.checkMultipleSelContextMenu([file1LockedFav, file2LockedFav], testData.multipleSelAllFav.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [file1LockedFav, file2LockedFav],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSelAllFav.toolbarMore
- );
- });
-
- it('multiple locked files - [C326688]', async () => {
- await testUtil.checkMultipleSelContextMenu([file3Locked, file1LockedFav], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [file3Locked, file1LockedFav],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSel.toolbarMore
- );
- });
- });
-
- describe('on Favorites : ', () => {
- beforeEach(async () => {
- await page.clickPersonalFiles();
- await page.clickFavoritesAndWait();
- });
-
- it('multiple files - all favorite - [C280656]', async () => {
- await testUtil.checkMultipleSelContextMenu([file1LockedFav, file2LockedFav], testData.multipleSelAllFav.favoritesContextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [file1LockedFav, file2LockedFav],
- testData.multipleSelAllFav.toolbarPrimary,
- testData.multipleSelAllFav.favoritesToolbarMore
- );
- });
- });
-
- describe('on Recent Files : ', () => {
- beforeEach(async () => {
- await page.clickPersonalFiles();
- await page.clickRecentFilesAndWait();
- });
-
- it('multiple files - [C280468]', async () => {
- await testUtil.checkMultipleSelContextMenu([file1, file2], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions([file1, file2], testData.multipleSel.toolbarPrimary, testData.multipleSel.toolbarMore);
- });
-
- it('multiple files - all favorite - [C326689]', async () => {
- await testUtil.checkMultipleSelContextMenu([file1LockedFav, file2LockedFav], testData.multipleSelAllFav.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [file1LockedFav, file2LockedFav],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSelAllFav.toolbarMore
- );
- });
- });
-
- describe('on Search Results : ', () => {
- beforeEach(async () => {
- await page.clickPersonalFiles();
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkOnlyFiles();
- await searchInput.searchFor(`*${random}`);
- await searchResultsPage.waitForResults();
- });
-
- it('[C291820] multiple files', async () => {
- await testUtil.checkMultipleSelContextMenu([file1, file2], testData.multipleSel.searchContextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [file1, file2],
- testData.multipleSel.searchToolbarPrimary,
- testData.multipleSel.searchToolbarMore
- );
- });
-
- it('[C326690] multiple files - all favorite, locked', async () => {
- await testUtil.checkMultipleSelContextMenu([file1LockedFav, file2LockedFav], testData.multipleSelAllFav.searchContextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [file1LockedFav, file2LockedFav],
- testData.multipleSelAllFav.searchToolbarPrimary,
- testData.multipleSelAllFav.searchToolbarMore
- );
- });
-
- it('[C297626] multiple locked files', async () => {
- await testUtil.checkMultipleSelContextMenu([file3Locked, file1LockedFav], testData.multipleSel.searchContextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [file3Locked, file1LockedFav],
- testData.multipleSel.searchToolbarPrimary,
- testData.multipleSel.searchToolbarMore
- );
- });
- });
-
- describe('on Shared Files : ', () => {
- beforeEach(async () => {
- await page.clickPersonalFiles();
- await page.clickSharedFilesAndWait();
- });
-
- it('multiple files - [C280467]', async () => {
- await testUtil.checkMultipleSelContextMenu([file1, file2], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions([file1, file2], testData.multipleSel.toolbarPrimary, testData.multipleSel.toolbarMore);
- });
-
- it('multiple files - all favorite - [C326691]', async () => {
- await testUtil.checkMultipleSelContextMenu([file1LockedFav, file2LockedFav], testData.multipleSelAllFav.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [file1LockedFav, file2LockedFav],
- testData.multipleSelAllFav.toolbarPrimary,
- testData.multipleSelAllFav.toolbarMore
- );
- });
-
- it('multiple locked files - [C297623]', async () => {
- await testUtil.checkMultipleSelContextMenu([file3Locked, file1LockedFav], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [file3Locked, file1LockedFav],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSel.toolbarMore
- );
- });
- });
-});
diff --git a/e2e/protractor/suites/actions-available/files-folders/office-files-actions.test.ts b/e2e/protractor/suites/actions-available/files-folders/office-files-actions.test.ts
deleted file mode 100755
index 966493de4e..0000000000
--- a/e2e/protractor/suites/actions-available/files-folders/office-files-actions.test.ts
+++ /dev/null
@@ -1,359 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { RepoClient, Utils, AdminActions, UserActions, LoginPage, FILES, BrowsingPage, SearchResultsPage } from '@alfresco/aca-testing-shared';
-import * as testData from './test-data';
-import * as testUtil from '../test-util';
-
-describe('Office Files - available actions : ', () => {
- const random = testData.random;
-
- const username = `user-${Utils.random()}`;
- const parentName = `parent-${Utils.random()}`;
-
- let parentId: string;
- let fileDocxFavId: string;
- let fileDocxSharedId: string;
- let fileDocxSharedFavId: string;
-
- const userApi = new RepoClient(username, username);
- const adminApiActions = new AdminActions();
- const userActions = new UserActions();
-
- const loginPage = new LoginPage();
- const page = new BrowsingPage();
- const { dataTable, toolbar } = page;
- const { searchInput } = page.pageLayoutHeader;
- const searchResultsPage = new SearchResultsPage();
-
- beforeAll(async () => {
- await adminApiActions.createUser({ username });
-
- parentId = (await userApi.nodes.createFolder(parentName)).entry.id;
-
- await userApi.upload.uploadFileWithRename(FILES.docxFile, parentId, testData.fileDocx.name);
- fileDocxFavId = (await userApi.upload.uploadFileWithRename(FILES.docxFile, parentId, testData.fileDocxFav.name)).entry.id;
- fileDocxSharedId = (await userApi.upload.uploadFileWithRename(FILES.docxFile, parentId, testData.fileDocxShared.name)).entry.id;
- fileDocxSharedFavId = (await userApi.upload.uploadFileWithRename(FILES.docxFile, parentId, testData.fileDocxSharedFav.name)).entry.id;
-
- const initialFavoritesTotalItems = (await userApi.favorites.getFavoritesTotalItems()) || 0;
- await userApi.favorites.addFavoritesByIds('file', [fileDocxFavId, fileDocxSharedFavId]);
- await userApi.favorites.waitForApi({ expect: initialFavoritesTotalItems + 2 });
-
- await userApi.shared.shareFilesByIds([fileDocxSharedId, fileDocxSharedFavId]);
- await userApi.shared.waitForFilesToBeShared([fileDocxSharedId, fileDocxSharedFavId]);
-
- await loginPage.loginWith(username);
- });
-
- afterAll(async () => {
- await userActions.login(username, username);
- await userActions.deleteNodes([parentId]);
- await userActions.emptyTrashcan();
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- describe('on Personal Files : ', () => {
- beforeEach(async () => {
- await page.clickPersonalFilesAndWait();
- await dataTable.doubleClickOnRowByName(parentName);
- await dataTable.waitForHeader();
- });
-
- describe('on a file', () => {
- it('File Office - [C213122]', async () => {
- await testUtil.checkToolbarActions(testData.fileDocx.name, testData.fileDocx.toolbarPrimary, testData.fileDocx.toolbarMore);
- await testUtil.checkContextMenu(testData.fileDocx.name, testData.fileDocx.contextMenu);
- });
-
- it('File Office, favorite - [C297612]', async () => {
- await testUtil.checkToolbarActions(testData.fileDocxFav.name, testData.fileDocxFav.toolbarPrimary, testData.fileDocxFav.toolbarMore);
- await testUtil.checkContextMenu(testData.fileDocxFav.name, testData.fileDocxFav.contextMenu);
- });
-
- it('File Office, shared - [C280448]', async () => {
- await testUtil.checkToolbarActions(testData.fileDocxShared.name, testData.fileDocxShared.toolbarPrimary, testData.fileDocxShared.toolbarMore);
- await testUtil.checkContextMenu(testData.fileDocxShared.name, testData.fileDocxShared.contextMenu);
- });
-
- it('File Office, shared, favorite - [C297616]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.toolbarPrimary,
- testData.fileDocxSharedFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileDocxSharedFav.name, testData.fileDocxSharedFav.contextMenu);
- });
- });
-
- describe('Viewer - file opened from Personal Files : ', () => {
- it('File Office - [C282025]', async () => {
- await testUtil.checkViewerActions(testData.fileDocx.name, testData.fileDocx.viewerToolbarPrimary, testData.fileDocx.viewerToolbarMore);
- });
-
- it('File Office, favorite - [C297583]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxFav.name,
- testData.fileDocxFav.viewerToolbarPrimary,
- testData.fileDocxFav.viewerToolbarMore
- );
- });
-
- it('File Office, shared - [C297597]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxShared.name,
- testData.fileDocxShared.viewerToolbarPrimary,
- testData.fileDocxShared.viewerToolbarMore
- );
- });
-
- it('File Office, shared, favorite - [C297598]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.viewerToolbarPrimary,
- testData.fileDocxSharedFav.viewerToolbarMore
- );
- });
- });
- });
-
- describe('on Favorites : ', () => {
- beforeEach(async () => {
- await page.clickFavoritesAndWait();
- });
-
- describe('single selection : ', () => {
- it('File Office, favorite - [C297618]', async () => {
- await testUtil.checkToolbarActions(testData.fileDocxFav.name, testData.fileDocxFav.toolbarPrimary, testData.fileDocxFav.favoritesToolbarMore);
- await testUtil.checkContextMenu(testData.fileDocxFav.name, testData.fileDocxFav.favoritesContextMenu);
- });
-
- it('File Office, shared, favorite - [C297620]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.favoritesToolbarPrimary,
- testData.fileDocxSharedFav.favoritesToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileDocxSharedFav.name, testData.fileDocxSharedFav.favoritesContextMenu);
- });
- });
-
- describe('Viewer - file opened from Favorites : ', () => {
- it('File Office, favorite - [C326702]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxFav.name,
- testData.fileDocxFav.viewerToolbarPrimary,
- testData.fileDocxFav.viewerToolbarMore
- );
- });
-
- it('File Office, shared, favorite - [C326704]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.viewerToolbarPrimary,
- testData.fileDocxSharedFav.viewerToolbarMore
- );
- });
- });
- });
-
- describe('on Recent Files : ', () => {
- beforeEach(async () => {
- await page.clickRecentFilesAndWait();
- });
-
- describe('on single selection', () => {
- it('File Office - [C297625]', async () => {
- await testUtil.checkToolbarActions(testData.fileDocx.name, testData.fileDocx.toolbarPrimary, testData.fileDocx.toolbarMore);
- await testUtil.checkContextMenu(testData.fileDocx.name, testData.fileDocx.contextMenu);
- });
-
- it('File Office, favorite - [C280470]', async () => {
- await testUtil.checkToolbarActions(testData.fileDocxFav.name, testData.fileDocxFav.toolbarPrimary, testData.fileDocxFav.toolbarMore);
- await testUtil.checkContextMenu(testData.fileDocxFav.name, testData.fileDocxFav.contextMenu);
- });
-
- it('File Office, shared - [C297633]', async () => {
- await testUtil.checkToolbarActions(testData.fileDocxShared.name, testData.fileDocxShared.toolbarPrimary, testData.fileDocxShared.toolbarMore);
- await testUtil.checkContextMenu(testData.fileDocxShared.name, testData.fileDocxShared.contextMenu);
- });
-
- it('File Office, shared, favorite - [C280616]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.toolbarPrimary,
- testData.fileDocxSharedFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileDocxSharedFav.name, testData.fileDocxSharedFav.contextMenu);
- });
- });
-
- describe('Viewer - file opened from Recent Files : ', () => {
- it('File Office - [C297599]', async () => {
- await testUtil.checkViewerActions(testData.fileDocx.name, testData.fileDocx.viewerToolbarPrimary, testData.fileDocx.viewerToolbarMore);
- });
-
- it('File Office, favorite - [C297600]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxFav.name,
- testData.fileDocxFav.viewerToolbarPrimary,
- testData.fileDocxFav.viewerToolbarMore
- );
- });
-
- it('File Office, shared - [C326694]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxShared.name,
- testData.fileDocxShared.viewerToolbarPrimary,
- testData.fileDocxShared.viewerToolbarMore
- );
- });
-
- it('File Office, shared, favorite - [C326695]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.viewerToolbarPrimary,
- testData.fileDocxSharedFav.viewerToolbarMore
- );
- });
- });
- });
-
- describe('on Search Results : ', () => {
- beforeEach(async () => {
- await page.clickPersonalFiles();
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.searchFor(`*${random}`);
- await searchResultsPage.waitForResults();
- });
-
- describe('on a file', () => {
- it('[C297637] File Office', async () => {
- await testUtil.checkToolbarActions(testData.fileDocx.name, testData.fileDocx.searchToolbarPrimary, testData.fileDocx.searchToolbarMore);
- await testUtil.checkContextMenu(testData.fileDocx.name, testData.fileDocx.searchContextMenu);
- });
-
- it('[C291827] File Office, favorite', async () => {
- await testUtil.checkToolbarActions(
- testData.fileDocxFav.name,
- testData.fileDocxFav.searchToolbarPrimary,
- testData.fileDocxFav.searchToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileDocxFav.name, testData.fileDocxFav.searchContextMenu);
- });
-
- it('[C297627] File Office, shared', async () => {
- await testUtil.checkToolbarActions(
- testData.fileDocxShared.name,
- testData.fileDocxShared.searchToolbarPrimary,
- testData.fileDocxShared.searchToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileDocxShared.name, testData.fileDocxShared.searchContextMenu);
- });
-
- it('[C280631] File Office, shared, favorite', async () => {
- await testUtil.checkToolbarActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.searchToolbarPrimary,
- testData.fileDocxSharedFav.searchToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileDocxSharedFav.name, testData.fileDocxSharedFav.searchContextMenu);
- });
- });
-
- describe('Viewer - file opened from Search Results : ', () => {
- it('File Office - [C326714]', async () => {
- await testUtil.checkViewerActions(testData.fileDocx.name, testData.fileDocx.viewerToolbarPrimary, testData.fileDocx.searchViewerToolbarMore);
- });
-
- it('File Office, favorite - [C326715]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxFav.name,
- testData.fileDocxFav.viewerToolbarPrimary,
- testData.fileDocxFav.searchViewerToolbarMore
- );
- });
-
- it('File Office, shared - [C326718]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxShared.name,
- testData.fileDocxShared.viewerToolbarPrimary,
- testData.fileDocxShared.searchViewerToolbarMore
- );
- });
-
- it('File Office, shared, favorite - [C326719]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.viewerToolbarPrimary,
- testData.fileDocxSharedFav.searchViewerToolbarMore
- );
- });
- });
- });
-
- describe('on Shared Files : ', () => {
- beforeEach(async () => {
- await page.clickSharedFilesAndWait();
- });
-
- describe('single selection', () => {
- it('File Office, shared - [C297629]', async () => {
- await testUtil.checkToolbarActions(testData.fileDocxShared.name, testData.fileDocxShared.toolbarPrimary, testData.fileDocxShared.toolbarMore);
- await testUtil.checkContextMenu(testData.fileDocxShared.name, testData.fileDocxShared.contextMenu);
- });
-
- it('File Office, shared, favorite - [C280652]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.toolbarPrimary,
- testData.fileDocxSharedFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileDocxSharedFav.name, testData.fileDocxSharedFav.contextMenu);
- });
- });
-
- describe('Viewer - file opened from Shared Files', () => {
- it('File Office, shared - [C326708]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxShared.name,
- testData.fileDocxShared.viewerToolbarPrimary,
- testData.fileDocxShared.viewerToolbarMore
- );
- });
-
- it('File Office, shared, favorite - [C326709]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.viewerToolbarPrimary,
- testData.fileDocxSharedFav.viewerToolbarMore
- );
- });
- });
- });
-});
diff --git a/e2e/protractor/suites/actions-available/files-folders/single-file-actions.test.ts b/e2e/protractor/suites/actions-available/files-folders/single-file-actions.test.ts
deleted file mode 100755
index 02b64e7158..0000000000
--- a/e2e/protractor/suites/actions-available/files-folders/single-file-actions.test.ts
+++ /dev/null
@@ -1,346 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { RepoClient, Utils, AdminActions, UserActions, LoginPage, BrowsingPage, SearchResultsPage } from '@alfresco/aca-testing-shared';
-import * as testData from './test-data';
-import * as testUtil from '../test-util';
-import { Logger } from '@alfresco/adf-testing';
-
-describe('Files - available actions : ', () => {
- const random = Utils.random();
-
- const username = `user-${random}`;
- const parentName = `parent-${random}`;
-
- let parentId: string;
- let fileFavId: string;
- let fileSharedId: string;
- let fileSharedFavId: string;
-
- const userApi = new RepoClient(username, username);
- const adminApiActions = new AdminActions();
- const userActions = new UserActions();
-
- const loginPage = new LoginPage();
- const page = new BrowsingPage();
- const { dataTable, toolbar } = page;
- const { searchInput } = page.pageLayoutHeader;
- const searchResultsPage = new SearchResultsPage();
-
- beforeAll(async () => {
- try {
- await adminApiActions.createUser({ username });
-
- parentId = (await userApi.nodes.createFolder(parentName)).entry.id;
-
- await userApi.nodes.createFile(testData.file.name, parentId);
- fileFavId = (await userApi.nodes.createFile(testData.fileFav.name, parentId)).entry.id;
- fileSharedId = (await userApi.nodes.createFile(testData.fileShared.name, parentId)).entry.id;
- fileSharedFavId = (await userApi.nodes.createFile(testData.fileSharedFav.name, parentId)).entry.id;
-
- const initialFavoritesTotalItems = (await userApi.favorites.getFavoritesTotalItems()) || 0;
- await userApi.favorites.addFavoritesByIds('file', [fileFavId, fileSharedFavId]);
- await userApi.favorites.waitForApi({ expect: initialFavoritesTotalItems + 2 });
-
- await userApi.shared.shareFilesByIds([fileSharedId, fileSharedFavId]);
- await userApi.shared.waitForFilesToBeShared([fileSharedId, fileSharedFavId]);
-
- await loginPage.loginWith(username);
- } catch (error) {
- Logger.error(`----- beforeEach failed : ${error}`);
- }
- });
-
- afterAll(async () => {
- await userActions.login(username, username);
- await userActions.deleteNodes([parentId]);
- await userActions.emptyTrashcan();
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- describe('on Personal Files : ', () => {
- beforeAll(async () => {
- await page.clickPersonalFilesAndWait();
- await dataTable.doubleClickOnRowByName(parentName);
- await dataTable.waitForHeader();
- });
-
- it('File simple - [C286265]', async () => {
- await testUtil.checkToolbarActions(testData.file.name, testData.file.toolbarPrimary, testData.file.toolbarMore);
- await testUtil.checkContextMenu(testData.file.name, testData.file.contextMenu);
- });
-
- it('File favorite - [C297615]', async () => {
- await testUtil.checkToolbarActions(testData.fileFav.name, testData.fileFav.toolbarPrimary, testData.fileFav.toolbarMore);
- await testUtil.checkContextMenu(testData.fileFav.name, testData.fileFav.contextMenu);
- });
-
- it('File shared - [C286323]', async () => {
- await testUtil.checkToolbarActions(testData.fileShared.name, testData.fileShared.toolbarPrimary, testData.fileShared.toolbarMore);
- await testUtil.checkContextMenu(testData.fileShared.name, testData.fileShared.contextMenu);
- });
-
- it('File shared, favorite - [C280450]', async () => {
- await testUtil.checkToolbarActions(testData.fileSharedFav.name, testData.fileSharedFav.toolbarPrimary, testData.fileSharedFav.toolbarMore);
- await testUtil.checkContextMenu(testData.fileSharedFav.name, testData.fileSharedFav.contextMenu);
- });
-
- describe('Viewer - file opened from Personal Files : ', () => {
- beforeAll(async () => {
- await page.clickPersonalFilesAndWait();
- await dataTable.doubleClickOnRowByName(parentName);
- await dataTable.waitForHeader();
- });
-
- it('File simple - [C297587]', async () => {
- await testUtil.checkViewerActions(testData.file.name, testData.file.viewerToolbarPrimary, testData.file.viewerToolbarMore);
- });
-
- it('File favorite - [C297588]', async () => {
- await testUtil.checkViewerActions(testData.fileFav.name, testData.fileFav.viewerToolbarPrimary, testData.fileFav.viewerToolbarMore);
- });
-
- it('File shared - [C291831]', async () => {
- await testUtil.checkViewerActions(testData.fileShared.name, testData.fileShared.viewerToolbarPrimary, testData.fileShared.viewerToolbarMore);
- });
-
- it('File shared, favorite - [C297632]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFav.name,
- testData.fileSharedFav.viewerToolbarPrimary,
- testData.fileSharedFav.viewerToolbarMore
- );
- });
- });
- });
-
- describe('on Favorites : ', () => {
- beforeAll(async () => {
- await page.clickFavoritesAndWait();
- });
-
- it('File favorite - [C280461]', async () => {
- await testUtil.checkToolbarActions(testData.fileFav.name, testData.fileFav.toolbarPrimary, testData.fileFav.favoritesToolbarMore);
- await testUtil.checkContextMenu(testData.fileFav.name, testData.fileFav.favoritesContextMenu);
- });
-
- it('File shared, favorite - [C280462]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedFav.name,
- testData.fileSharedFav.favoritesToolbarPrimary,
- testData.fileSharedFav.favoritesToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedFav.name, testData.fileSharedFav.favoritesContextMenu);
- });
-
- describe('Viewer - file opened from Favorites : ', () => {
- beforeAll(async () => {
- await page.clickFavoritesAndWait();
- });
-
- it('File favorite - [C326703]', async () => {
- await testUtil.checkViewerActions(testData.fileFav.name, testData.fileFav.viewerToolbarPrimary, testData.fileFav.viewerToolbarMore);
- });
-
- it('File shared, favorite - [C326705]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFav.name,
- testData.fileSharedFav.viewerToolbarPrimary,
- testData.fileSharedFav.viewerToolbarMore
- );
- });
- });
- });
-
- describe('on Recent Files : ', () => {
- beforeAll(async () => {
- await page.clickRecentFilesAndWait();
- });
-
- it('File simple - [C280471]', async () => {
- await testUtil.checkToolbarActions(testData.file.name, testData.file.toolbarPrimary, testData.file.toolbarMore);
- await testUtil.checkContextMenu(testData.file.name, testData.file.contextMenu);
- });
-
- it('File favorite - [C280615]', async () => {
- await testUtil.checkToolbarActions(testData.fileFav.name, testData.fileFav.toolbarPrimary, testData.fileFav.toolbarMore);
- await testUtil.checkContextMenu(testData.fileFav.name, testData.fileFav.contextMenu);
- });
-
- it('File shared - [C280601]', async () => {
- await testUtil.checkToolbarActions(testData.fileShared.name, testData.fileShared.toolbarPrimary, testData.fileShared.toolbarMore);
- await testUtil.checkContextMenu(testData.fileShared.name, testData.fileShared.contextMenu);
- });
-
- it('File shared, favorite - [C297635]', async () => {
- await testUtil.checkToolbarActions(testData.fileSharedFav.name, testData.fileSharedFav.toolbarPrimary, testData.fileSharedFav.toolbarMore);
- await testUtil.checkContextMenu(testData.fileSharedFav.name, testData.fileSharedFav.contextMenu);
- });
-
- describe('Viewer - file opened from Recent Files : ', () => {
- beforeAll(async () => {
- await page.clickRecentFilesAndWait();
- });
-
- it('File simple - [C326692]', async () => {
- await testUtil.checkViewerActions(testData.file.name, testData.file.viewerToolbarPrimary, testData.file.viewerToolbarMore);
- });
-
- it('File favorite - [C326693]', async () => {
- await testUtil.checkViewerActions(testData.fileFav.name, testData.fileFav.viewerToolbarPrimary, testData.fileFav.viewerToolbarMore);
- });
-
- it('File shared - [C326696]', async () => {
- await testUtil.checkViewerActions(testData.fileShared.name, testData.fileShared.viewerToolbarPrimary, testData.fileShared.viewerToolbarMore);
- });
-
- it('File shared, favorite - [C326697]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFav.name,
- testData.fileSharedFav.viewerToolbarPrimary,
- testData.fileSharedFav.viewerToolbarMore
- );
- });
- });
- });
-
- describe('on Search Results : ', () => {
- beforeEach(async () => {
- await page.clickPersonalFiles();
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- });
-
- it('[C297638] File simple', async () => {
- await searchInput.searchFor(testData.file.name);
- await searchResultsPage.waitForResults();
-
- await testUtil.checkToolbarActions(testData.file.name, testData.file.searchToolbarPrimary, testData.file.searchToolbarMore);
- await testUtil.checkContextMenu(testData.file.name, testData.file.searchContextMenu);
- });
-
- it('[C280661] File favorite', async () => {
- await searchInput.searchFor(testData.fileFav.name);
- await searchResultsPage.waitForResults();
-
- await testUtil.checkToolbarActions(testData.fileFav.name, testData.fileFav.searchToolbarPrimary, testData.fileFav.searchToolbarMore);
- await testUtil.checkContextMenu(testData.fileFav.name, testData.fileFav.searchContextMenu);
- });
-
- it('[C280632] File shared', async () => {
- await searchInput.searchFor(testData.fileShared.name);
- await searchResultsPage.waitForResults();
-
- await testUtil.checkToolbarActions(testData.fileShared.name, testData.fileShared.searchToolbarPrimary, testData.fileShared.searchToolbarMore);
- await testUtil.checkContextMenu(testData.fileShared.name, testData.fileShared.searchContextMenu);
- });
-
- it('[C280641] File shared, favorite', async () => {
- await searchInput.searchFor(testData.fileSharedFav.name);
- await searchResultsPage.waitForResults();
-
- await testUtil.checkToolbarActions(
- testData.fileSharedFav.name,
- testData.fileSharedFav.searchToolbarPrimary,
- testData.fileSharedFav.searchToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedFav.name, testData.fileSharedFav.searchContextMenu);
- });
-
- describe('Viewer - file opened from Search Results : ', () => {
- it('File simple - [C326716]', async () => {
- await searchInput.searchFor(testData.file.name);
- await searchResultsPage.waitForResults();
- await testUtil.checkViewerActions(testData.file.name, testData.file.viewerToolbarPrimary, testData.file.searchViewerToolbarMore);
- });
-
- it('File favorite - [C326717]', async () => {
- await searchInput.searchFor(testData.fileFav.name);
- await searchResultsPage.waitForResults();
- await testUtil.checkViewerActions(testData.fileFav.name, testData.fileFav.viewerToolbarPrimary, testData.fileFav.searchViewerToolbarMore);
- });
-
- it('File shared - [C326720]', async () => {
- await searchInput.searchFor(testData.fileShared.name);
- await searchResultsPage.waitForResults();
-
- await testUtil.checkViewerActions(
- testData.fileShared.name,
- testData.fileShared.viewerToolbarPrimary,
- testData.fileShared.searchViewerToolbarMore
- );
- });
-
- it('File shared, favorite - [C326721]', async () => {
- await searchInput.searchFor(testData.fileSharedFav.name);
- await searchResultsPage.waitForResults();
-
- await testUtil.checkViewerActions(
- testData.fileSharedFav.name,
- testData.fileSharedFav.viewerToolbarPrimary,
- testData.fileSharedFav.searchViewerToolbarMore
- );
- });
- });
- });
-
- describe('on Shared Files : ', () => {
- beforeAll(async () => {
- await page.clickSharedFilesAndWait();
- });
-
- describe('single selection', () => {
- it('File shared - [C297630]', async () => {
- await testUtil.checkToolbarActions(testData.fileShared.name, testData.fileShared.toolbarPrimary, testData.fileShared.toolbarMore);
- await testUtil.checkContextMenu(testData.fileShared.name, testData.fileShared.contextMenu);
- });
-
- it('File shared, favorite - [C286273]', async () => {
- await testUtil.checkToolbarActions(testData.fileSharedFav.name, testData.fileSharedFav.toolbarPrimary, testData.fileSharedFav.toolbarMore);
- await testUtil.checkContextMenu(testData.fileSharedFav.name, testData.fileSharedFav.contextMenu);
- });
- });
-
- describe('Viewer - file opened from Shared Files : ', () => {
- beforeAll(async () => {
- await page.clickSharedFilesAndWait();
- });
-
- it('File shared - [C326710]', async () => {
- await testUtil.checkViewerActions(testData.fileShared.name, testData.fileShared.viewerToolbarPrimary, testData.fileShared.viewerToolbarMore);
- });
-
- it('File shared, favorite - [C326711]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFav.name,
- testData.fileSharedFav.viewerToolbarPrimary,
- testData.fileSharedFav.viewerToolbarMore
- );
- });
- });
- });
-});
diff --git a/e2e/protractor/suites/actions-available/files-folders/test-data.ts b/e2e/protractor/suites/actions-available/files-folders/test-data.ts
deleted file mode 100644
index 68d39aab20..0000000000
--- a/e2e/protractor/suites/actions-available/files-folders/test-data.ts
+++ /dev/null
@@ -1,916 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { Utils } from '@alfresco/aca-testing-shared';
-
-export const random = Utils.random();
-
-export const trashActions = ['Permanently Delete', 'Restore'];
-
-// ----- files -----
-
-const fileContextMenu = [
- 'Share',
- 'Download',
- 'View',
- 'Edit Offline',
- 'Upload New Version',
- 'Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const fileSharedFavLockedContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Cancel Editing',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Permissions'
-];
-const fileToolbarPrimary = ['Share', 'Download', 'View', 'View Details', 'More Actions'];
-const fileToolbarMore = [
- 'Edit Offline',
- 'Upload New Version',
- 'Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const fileDocxToolbarMore = [
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const fileDocxContextMenu = [
- 'Share',
- 'Download',
- 'View',
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const fileSharedToolbarPrimary = ['Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];
-const fileFavLockedToolbarMore = [
- 'Cancel Editing',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Permissions'
-];
-const fileDocxFavContextMenu = [
- 'Share',
- 'Download',
- 'View',
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const fileDocxFavToolbarMore = [
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const fileDocxSharedFavContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const fileDocxSharedContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const fileFavContextMenu = [
- 'Share',
- 'Download',
- 'View',
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const fileFavToolbarMore = [
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const fileSharedFavContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const fileSharedContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Edit Offline',
- 'Upload New Version',
- 'Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const fileFavLockedContextMenu = [
- 'Share',
- 'Download',
- 'View',
- 'Cancel Editing',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Permissions'
-];
-const fileLockedContextMenu = [
- 'Share',
- 'Download',
- 'View',
- 'Cancel Editing',
- 'Upload New Version',
- 'Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Permissions'
-];
-const fileLockedToolbarMore = ['Cancel Editing', 'Upload New Version', 'Favorite', 'Move', 'Copy', 'Delete', 'Manage Versions', 'Permissions'];
-const fileSharedLockedContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Cancel Editing',
- 'Upload New Version',
- 'Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Permissions'
-];
-
-// ---- VIEWER ----
-
-const viewerSharedToolbarPrimary = ['Activate full-screen mode', 'Shared Link Settings', 'Download', 'Print', 'View Details', 'More Actions'];
-const viewerToolbarPrimary = ['Activate full-screen mode', 'Share', 'Download', 'Print', 'View Details', 'More Actions'];
-const viewerToolbarMore = [
- 'Edit Offline',
- 'Upload New Version',
- 'Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const viewerFavToolbarMore = [
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const viewerDocxToolbarMore = [
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const viewerFavLockedToolbarMore = [
- 'Cancel Editing',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Permissions'
-];
-const viewerDocxFavToolbarMore = [
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const viewerLockedToolbarMore = ['Cancel Editing', 'Upload New Version', 'Favorite', 'Move', 'Copy', 'Delete', 'Manage Versions', 'Permissions'];
-// ---- FAVORITES workarounds ----
-
-// TODO: investigate why 'Edit Offline', 'Edit in Microsoft Office™' and 'Permissions' are not displayed and raise issue
-const favoritesContextMenu = ['Share', 'Download', 'View', 'Upload New Version', 'Remove Favorite', 'Move', 'Copy', 'Delete', 'Manage Versions'];
-// TODO: investigate why 'Permissions' is not displayed and raise issue
-const favoritesLockedContextMenu = [
- 'Share',
- 'Download',
- 'View',
- 'Cancel Editing',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions'
-];
-// TODO: investigate why 'Edit Offline', 'Edit in Microsoft Office™' and 'Permissions' are not displayed and raise issue
-const favoritesToolbarMore = ['Upload New Version', 'Remove Favorite', 'Move', 'Copy', 'Delete', 'Manage Versions'];
-// TODO: investigate why 'Permissions' is not displayed and raise issue
-const favoritesLockedToolbarMore = ['Cancel Editing', 'Upload New Version', 'Remove Favorite', 'Move', 'Copy', 'Delete', 'Manage Versions'];
-// TODO: investigate why 'Edit Offline', 'Edit in Microsoft Office™' and 'Permissions' are not displayed and raise issue
-const favoritesSharedContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions'
-];
-// TODO: investigate why 'Permissions' is not displayed and raise issue
-const favoritesSharedLockedContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Cancel Editing',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions'
-];
-
-// ---- SEARCH workarounds ----
-
-const searchDocxContextMenu = [
- 'Share',
- 'Download',
- 'View',
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Favorite',
- 'Copy',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const searchToolbarPrimary = ['Share', 'Download', 'View', 'View Details', 'More Actions'];
-const searchSharedToolbarPrimary = ['Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];
-const searchFavLockedToolbarMore = ['Cancel Editing', 'Upload New Version', 'Remove Favorite', 'Copy', 'Manage Versions', 'Permissions'];
-const searchSharedFavLockedContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Cancel Editing',
- 'Upload New Version',
- 'Remove Favorite',
- 'Copy',
- 'Manage Versions',
- 'Permissions'
-];
-const searchDocxToolbarMore = [
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Favorite',
- 'Copy',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const searchFavContextMenu = [
- 'Share',
- 'Download',
- 'View',
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Copy',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const searchSharedLockedContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Cancel Editing',
- 'Upload New Version',
- 'Favorite',
- 'Copy',
- 'Manage Versions',
- 'Permissions'
-];
-const searchDocxFavContextMenu = [
- 'Share',
- 'Download',
- 'View',
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Copy',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const searchDocxFavToolbarMore = [
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Copy',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const searchSharedContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Edit Offline',
- 'Upload New Version',
- 'Favorite',
- 'Copy',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const searchToolbarMore = ['Edit Offline', 'Upload New Version', 'Favorite', 'Copy', 'Manage Versions', 'Edit Aspects', 'Permissions'];
-const searchDocxSharedFavContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Copy',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const searchDocxSharedContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Favorite',
- 'Copy',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const searchFavToolbarMore = ['Edit Offline', 'Upload New Version', 'Remove Favorite', 'Copy', 'Manage Versions', 'Edit Aspects', 'Permissions'];
-const searchContextMenu = [
- 'Share',
- 'Download',
- 'View',
- 'Edit Offline',
- 'Upload New Version',
- 'Favorite',
- 'Copy',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const searchFavLockedContextMenu = [
- 'Share',
- 'Download',
- 'View',
- 'Cancel Editing',
- 'Upload New Version',
- 'Remove Favorite',
- 'Copy',
- 'Manage Versions',
- 'Permissions'
-];
-const searchLockedToolbarMore = ['Cancel Editing', 'Upload New Version', 'Favorite', 'Copy', 'Manage Versions', 'Permissions'];
-const searchLockedContextMenu = [
- 'Share',
- 'Download',
- 'View',
- 'Cancel Editing',
- 'Upload New Version',
- 'Favorite',
- 'Copy',
- 'Manage Versions',
- 'Permissions'
-];
-const searchSharedFavContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Copy',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-
-const searchViewerToolbarMore = ['Edit Offline', 'Upload New Version', 'Favorite', 'Copy', 'Manage Versions', 'Edit Aspects', 'Permissions'];
-const searchViewerFavToolbarMore = [
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Copy',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const searchViewerDocxToolbarMore = [
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Favorite',
- 'Copy',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const searchViewerFavLockedToolbarMore = ['Cancel Editing', 'Upload New Version', 'Remove Favorite', 'Copy', 'Manage Versions', 'Permissions'];
-const searchViewerDocxFavToolbarMore = [
- 'Edit in Microsoft Office™',
- 'Edit Offline',
- 'Upload New Version',
- 'Remove Favorite',
- 'Copy',
- 'Manage Versions',
- 'Edit Aspects',
- 'Permissions'
-];
-const searchViewerLockedToolbarMore = ['Cancel Editing', 'Upload New Version', 'Favorite', 'Copy', 'Manage Versions', 'Permissions'];
-
-export const fileDocx = {
- name: `fileActions-docx-${random}.docx`,
- description: 'file not shared, not fav, office, not locked',
-
- contextMenu: fileDocxContextMenu,
- toolbarPrimary: fileToolbarPrimary,
- toolbarMore: fileDocxToolbarMore,
- viewerToolbarPrimary,
- viewerToolbarMore: viewerDocxToolbarMore,
-
- searchContextMenu: searchDocxContextMenu,
- searchToolbarPrimary,
- searchToolbarMore: searchDocxToolbarMore,
- searchViewerToolbarMore: searchViewerDocxToolbarMore
-};
-
-export const fileDocxFav = {
- name: `fileActions-docx-fav-${random}.docx`,
- description: 'file not shared, fav, office, not locked',
-
- contextMenu: fileDocxFavContextMenu,
- toolbarPrimary: fileToolbarPrimary,
- toolbarMore: fileDocxFavToolbarMore,
- viewerToolbarPrimary,
- viewerToolbarMore: viewerDocxFavToolbarMore,
-
- favoritesToolbarMore,
- favoritesContextMenu,
-
- searchContextMenu: searchDocxFavContextMenu,
- searchToolbarPrimary,
- searchToolbarMore: searchDocxFavToolbarMore,
- searchViewerToolbarMore: searchViewerDocxFavToolbarMore
-};
-
-export const file = {
- name: `fileActions-${random}.txt`,
- description: 'file not shared, not fav, not office, not locked',
-
- contextMenu: fileContextMenu,
- toolbarPrimary: fileToolbarPrimary,
- toolbarMore: fileToolbarMore,
- viewerToolbarPrimary,
- viewerToolbarMore,
-
- searchViewerToolbarMore,
- searchContextMenu,
- searchToolbarPrimary,
- searchToolbarMore
-};
-
-export const fileFav = {
- name: `fileActions-fav-${random}.txt`,
- description: 'file not shared, fav, not office, not locked',
-
- contextMenu: fileFavContextMenu,
- toolbarPrimary: fileToolbarPrimary,
- toolbarMore: fileFavToolbarMore,
- viewerToolbarPrimary,
- viewerToolbarMore: viewerFavToolbarMore,
-
- favoritesContextMenu,
- favoritesToolbarMore,
-
- searchContextMenu: searchFavContextMenu,
- searchToolbarPrimary,
- searchToolbarMore: searchFavToolbarMore,
- searchViewerToolbarMore: searchViewerFavToolbarMore
-};
-
-export const fileDocxShared = {
- name: `fileActions-docx-shared-${random}.docx`,
- description: 'file shared, not fav, office, not locked',
-
- contextMenu: fileDocxSharedContextMenu,
- toolbarPrimary: fileSharedToolbarPrimary,
- toolbarMore: fileDocxToolbarMore,
- viewerToolbarPrimary: viewerSharedToolbarPrimary,
- viewerToolbarMore: viewerDocxToolbarMore,
-
- searchContextMenu: searchDocxSharedContextMenu,
- searchToolbarPrimary: searchSharedToolbarPrimary,
- searchToolbarMore: searchDocxToolbarMore,
- searchViewerToolbarMore: searchViewerDocxToolbarMore
-};
-
-export const fileDocxSharedFav = {
- name: `fileActions-docx-shared-fav-${random}.docx`,
- description: 'file shared, fav, office, not locked',
-
- contextMenu: fileDocxSharedFavContextMenu,
- toolbarPrimary: fileSharedToolbarPrimary,
- toolbarMore: fileDocxFavToolbarMore,
- viewerToolbarPrimary: viewerSharedToolbarPrimary,
- viewerToolbarMore: viewerDocxFavToolbarMore,
-
- favoritesContextMenu: favoritesSharedContextMenu,
- favoritesToolbarPrimary: fileSharedToolbarPrimary,
- favoritesToolbarMore,
-
- searchContextMenu: searchDocxSharedFavContextMenu,
- searchToolbarPrimary: searchSharedToolbarPrimary,
- searchToolbarMore: searchDocxFavToolbarMore,
- searchViewerToolbarMore: searchViewerDocxFavToolbarMore
-};
-
-export const fileShared = {
- name: `fileActions-shared-${random}.txt`,
- description: 'file shared, not fav, not office, not locked',
-
- contextMenu: fileSharedContextMenu,
- toolbarPrimary: fileSharedToolbarPrimary,
- toolbarMore: fileToolbarMore,
- viewerToolbarPrimary: viewerSharedToolbarPrimary,
- viewerToolbarMore,
-
- searchContextMenu: searchSharedContextMenu,
- searchToolbarPrimary: searchSharedToolbarPrimary,
- searchToolbarMore,
- searchViewerToolbarMore
-};
-
-export const fileSharedFav = {
- name: `fileActions-shared-fav-${random}.txt`,
- description: 'file shared, fav, not office, not locked',
-
- contextMenu: fileSharedFavContextMenu,
- toolbarPrimary: fileSharedToolbarPrimary,
- toolbarMore: fileFavToolbarMore,
- viewerToolbarPrimary: viewerSharedToolbarPrimary,
- viewerToolbarMore: viewerFavToolbarMore,
-
- favoritesContextMenu: favoritesSharedContextMenu,
- favoritesToolbarPrimary: fileSharedToolbarPrimary,
- favoritesToolbarMore,
-
- searchContextMenu: searchSharedFavContextMenu,
- searchToolbarPrimary: searchSharedToolbarPrimary,
- searchToolbarMore: searchFavToolbarMore,
- searchViewerToolbarMore: searchViewerFavToolbarMore
-};
-
-export const fileLocked = {
- name: `fileActions-locked-${random}.txt`,
- description: 'file not shared, not fav, not office, locked',
-
- contextMenu: fileLockedContextMenu,
- toolbarPrimary: fileToolbarPrimary,
- toolbarMore: fileLockedToolbarMore,
- viewerToolbarPrimary,
- viewerToolbarMore: viewerLockedToolbarMore,
-
- searchContextMenu: searchLockedContextMenu,
- searchToolbarPrimary,
- searchToolbarMore: searchLockedToolbarMore,
- searchViewerToolbarMore: searchViewerLockedToolbarMore
-};
-
-export const fileFavLocked = {
- name: `fileActions-fav-locked-${random}.txt`,
- description: 'file not shared, fav, not office, locked',
-
- contextMenu: fileFavLockedContextMenu,
- toolbarPrimary: fileToolbarPrimary,
- toolbarMore: fileFavLockedToolbarMore,
- viewerToolbarPrimary,
- viewerToolbarMore: viewerFavLockedToolbarMore,
-
- favoritesContextMenu: favoritesLockedContextMenu,
- favoritesToolbarMore: favoritesLockedToolbarMore,
-
- searchContextMenu: searchFavLockedContextMenu,
- searchToolbarPrimary,
- searchToolbarMore: searchFavLockedToolbarMore,
- searchViewerToolbarMore: searchViewerFavLockedToolbarMore
-};
-
-export const fileSharedLocked = {
- name: `fileActions-shared-locked-${random}.txt`,
- description: 'file shared, not fav, not office, locked',
-
- contextMenu: fileSharedLockedContextMenu,
- toolbarPrimary: fileSharedToolbarPrimary,
- toolbarMore: fileLockedToolbarMore,
- viewerToolbarPrimary: viewerSharedToolbarPrimary,
- viewerToolbarMore: viewerLockedToolbarMore,
-
- searchContextMenu: searchSharedLockedContextMenu,
- searchToolbarPrimary: searchSharedToolbarPrimary,
- searchToolbarMore: searchLockedToolbarMore,
- searchViewerToolbarMore: searchViewerLockedToolbarMore
-};
-
-export const fileSharedFavLocked = {
- name: `fileActions-shared-fav-locked-${random}.txt`,
- description: 'file shared, fav, not office, locked',
-
- contextMenu: fileSharedFavLockedContextMenu,
- toolbarPrimary: fileSharedToolbarPrimary,
- toolbarMore: fileFavLockedToolbarMore,
- viewerToolbarPrimary: viewerSharedToolbarPrimary,
- viewerToolbarMore: viewerFavLockedToolbarMore,
-
- favoritesToolbarMore: favoritesLockedToolbarMore,
- favoritesContextMenu: favoritesSharedLockedContextMenu,
- favoritesToolbarPrimary: fileSharedToolbarPrimary,
-
- searchContextMenu: searchSharedFavLockedContextMenu,
- searchToolbarPrimary: searchSharedToolbarPrimary,
- searchToolbarMore: searchFavLockedToolbarMore,
- searchViewerToolbarMore: searchViewerFavLockedToolbarMore
-};
-
-export const fileInTrash = {
- name: `deleted-file-${random}.txt`,
- trashActions
-};
-
-export const file2InTrash = {
- name: `deleted-file2-${random}.txt`,
- trashActions
-};
-
-export const folderInTrash = {
- name: `deleted-folder-${random}`,
- trashActions
-};
-
-export const folder2InTrash = {
- name: `deleted-folder2-${random}`,
- trashActions
-};
-
-// ---- folders ---
-
-const folderContextMenu = ['Download', 'Edit', 'Favorite', 'Move', 'Copy', 'Delete', 'Edit Aspects', 'Permissions', 'Manage Rules'];
-const folderFavContextMenu = ['Download', 'Edit', 'Remove Favorite', 'Move', 'Copy', 'Delete', 'Edit Aspects', 'Permissions', 'Manage Rules'];
-const folderToolbarPrimary = ['Download', 'View Details', 'More Actions'];
-const folderToolbarMore = ['Edit', 'Favorite', 'Move', 'Copy', 'Delete', 'Edit Aspects', 'Permissions', 'Manage Rules'];
-const folderFavToolbarMore = ['Edit', 'Remove Favorite', 'Move', 'Copy', 'Delete', 'Edit Aspects', 'Permissions', 'Manage Rules'];
-
-const favoritesFolderFavContextMenu = ['Download', 'Edit', 'Remove Favorite', 'Move', 'Copy', 'Delete'];
-const favoritesFolderFavToolbarMore = ['Edit', 'Remove Favorite', 'Move', 'Copy', 'Delete'];
-
-const searchFolderContextMenu = ['Download', 'Edit', 'Favorite', 'Copy', 'Edit Aspects', 'Permissions', 'Manage Rules'];
-const searchFolderToolbarPrimary = ['Download', 'View Details', 'More Actions'];
-const searchFolderToolbarMore = ['Edit', 'Favorite', 'Copy', 'Edit Aspects', 'Permissions', 'Manage Rules'];
-const searchFolderFavContextMenu = ['Download', 'Edit', 'Remove Favorite', 'Copy', 'Edit Aspects', 'Permissions', 'Manage Rules'];
-const searchFolderFavToolbarMore = ['Edit', 'Remove Favorite', 'Copy', 'Edit Aspects', 'Permissions', 'Manage Rules'];
-
-export const folder = {
- name: `folderActions-${random}`,
- description: 'folder not favorite',
-
- contextMenu: folderContextMenu,
- toolbarPrimary: folderToolbarPrimary,
- toolbarMore: folderToolbarMore,
-
- searchContextMenu: searchFolderContextMenu,
- searchToolbarPrimary: searchFolderToolbarPrimary,
- searchToolbarMore: searchFolderToolbarMore
-};
-
-export const folderFav = {
- name: `folderActions-fav-${random}`,
- description: 'folder favorite',
-
- contextMenu: folderFavContextMenu,
- toolbarPrimary: folderToolbarPrimary,
- toolbarMore: folderFavToolbarMore,
-
- favoritesContextMenu: favoritesFolderFavContextMenu,
- favoritesToolbarMore: favoritesFolderFavToolbarMore,
-
- searchContextMenu: searchFolderFavContextMenu,
- searchToolbarPrimary: searchFolderToolbarPrimary,
- searchToolbarMore: searchFolderFavToolbarMore
-};
-
-export const folderFav2 = {
- name: `folderActions-fav-2-${random}`,
- description: 'folder favorite',
-
- contextMenu: folderFavContextMenu,
- toolbarPrimary: folderToolbarPrimary,
- toolbarMore: folderFavToolbarMore,
-
- favoritesContextMenu: favoritesFolderFavContextMenu,
- favoritesToolbarMore: favoritesFolderFavToolbarMore,
-
- searchContextMenu: searchFolderFavContextMenu,
- searchToolbarPrimary: searchFolderToolbarPrimary,
- searchToolbarMore: searchFolderFavToolbarMore
-};
-
-// ---- multiple selection ---
-
-// TODO: raise issue to remove 'Permissions'
-const multipleSelContextMenu = ['Download', 'Favorite', 'Move', 'Copy', 'Delete', 'Permissions'];
-// TODO: raise issue to remove 'Permissions'
-const multipleSelAllFavContextMenu = ['Download', 'Remove Favorite', 'Move', 'Copy', 'Delete', 'Permissions'];
-const multipleSelToolbarPrimary = ['Download', 'View Details', 'More Actions'];
-// TODO: raise issue to remove 'Permissions'
-const multipleSelToolbarMore = ['Favorite', 'Move', 'Copy', 'Delete', 'Permissions'];
-// TODO: raise issue to remove 'Permissions'
-const multipleSelAllFavToolbarMore = ['Remove Favorite', 'Move', 'Copy', 'Delete', 'Permissions'];
-
-const favoritesMultipleSelAllFavContextMenu = ['Download', 'Remove Favorite', 'Move', 'Copy', 'Delete'];
-const favoritesMultipleSelAllFavToolbarMore = ['Remove Favorite', 'Move', 'Copy', 'Delete'];
-
-// TODO: raise issue to remove 'Permissions'
-const searchMultipleSelContextMenu = ['Download', 'Favorite', 'Copy', 'Permissions'];
-// TODO: raise issue to remove 'Permissions'
-const searchMultipleSelAllFavContextMenu = ['Download', 'Remove Favorite', 'Copy', 'Permissions'];
-const searchMultipleSelToolbarPrimary = ['Download', 'View Details', 'More Actions'];
-// TODO: raise issue to remove 'Permissions'
-const searchMultipleSelToolbarMore = ['Favorite', 'Copy', 'Permissions'];
-// TODO: raise issue to remove 'Permissions'
-const searchMultipleSelAllFavToolbarMore = ['Remove Favorite', 'Copy', 'Permissions'];
-
-export const multipleSel = {
- contextMenu: multipleSelContextMenu,
- toolbarPrimary: multipleSelToolbarPrimary,
- toolbarMore: multipleSelToolbarMore,
-
- searchContextMenu: searchMultipleSelContextMenu,
- searchToolbarMore: searchMultipleSelToolbarMore,
- searchToolbarPrimary: searchMultipleSelToolbarPrimary
-};
-
-export const multipleSelAllFav = {
- contextMenu: multipleSelAllFavContextMenu,
- toolbarPrimary: multipleSelToolbarPrimary,
- toolbarMore: multipleSelAllFavToolbarMore,
-
- favoritesContextMenu: favoritesMultipleSelAllFavContextMenu,
- favoritesToolbarMore: favoritesMultipleSelAllFavToolbarMore,
-
- searchToolbarPrimary: searchMultipleSelToolbarPrimary,
- searchContextMenu: searchMultipleSelAllFavContextMenu,
- searchToolbarMore: searchMultipleSelAllFavToolbarMore
-};
diff --git a/e2e/protractor/suites/actions-available/files-folders/trash.test.ts b/e2e/protractor/suites/actions-available/files-folders/trash.test.ts
deleted file mode 100755
index 75c8fa9136..0000000000
--- a/e2e/protractor/suites/actions-available/files-folders/trash.test.ts
+++ /dev/null
@@ -1,97 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { RepoClient, Utils, AdminActions, UserActions, LoginPage, BrowsingPage } from '@alfresco/aca-testing-shared';
-import * as testData from './test-data';
-import * as testUtil from '../test-util';
-
-const page = new BrowsingPage();
-
-describe('Trash - available actions : ', () => {
- const random = Utils.random();
-
- const username = `user-${random}`;
-
- let fileInTrashId: string;
- let file2InTrashId: string;
- let folderInTrashId: string;
- let folder2InTrashId: string;
-
- const userApi = new RepoClient(username, username);
- const adminApiActions = new AdminActions();
- const userActions = new UserActions();
-
- const loginPage = new LoginPage();
-
- beforeAll(async () => {
- await adminApiActions.createUser({ username });
-
- fileInTrashId = (await userApi.nodes.createFile(testData.fileInTrash.name)).entry.id;
- file2InTrashId = (await userApi.nodes.createFile(testData.file2InTrash.name)).entry.id;
- folderInTrashId = (await userApi.nodes.createFolder(testData.folderInTrash.name)).entry.id;
- folder2InTrashId = (await userApi.nodes.createFolder(testData.folder2InTrash.name)).entry.id;
-
- await userActions.login(username, username);
- const initialDeletedTotalItems = await userActions.getTrashcanSize();
- await userActions.deleteNodes([fileInTrashId, file2InTrashId, folderInTrashId, folder2InTrashId], false);
- await userActions.waitForTrashcanSize(initialDeletedTotalItems + 4);
-
- await loginPage.loginWith(username);
- await page.clickTrashAndWait();
- });
-
- afterAll(async () => {
- await userActions.login(username, username);
- await userActions.emptyTrashcan();
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- it('on a file - [C286258]', async () => {
- await testUtil.checkToolbarPrimary(testData.fileInTrash.name, testData.fileInTrash.trashActions);
- await testUtil.checkContextMenu(testData.fileInTrash.name, testData.fileInTrash.trashActions);
- });
-
- it('on a folder - [C286259]', async () => {
- await testUtil.checkToolbarPrimary(testData.folderInTrash.name, testData.folderInTrash.trashActions);
- await testUtil.checkContextMenu(testData.folderInTrash.name, testData.folderInTrash.trashActions);
- });
-
- it('multiple files - [C280472]', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.fileInTrash.name, testData.file2InTrash.name], testData.trashActions);
- await testUtil.checkMultipleSelToolbarPrimary([testData.fileInTrash.name, testData.file2InTrash.name], testData.trashActions);
- });
-
- it('multiple folders - [C280473]', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.folderInTrash.name, testData.folder2InTrash.name], testData.trashActions);
- await testUtil.checkMultipleSelToolbarPrimary([testData.folderInTrash.name, testData.folder2InTrash.name], testData.trashActions);
- });
-
- it('both files and folders - [C280474]', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.fileInTrash.name, testData.folderInTrash.name], testData.trashActions);
- await testUtil.checkMultipleSelToolbarPrimary([testData.fileInTrash.name, testData.folderInTrash.name], testData.trashActions);
- });
-});
diff --git a/e2e/protractor/suites/actions-available/libraries/library-trash.test.ts b/e2e/protractor/suites/actions-available/libraries/library-trash.test.ts
deleted file mode 100755
index 55607fed72..0000000000
--- a/e2e/protractor/suites/actions-available/libraries/library-trash.test.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { LoginPage, BrowsingPage, Utils, AdminActions, UserActions } from '@alfresco/aca-testing-shared';
-import * as testData from './test-data-libraries';
-import * as testUtil from '../test-util';
-
-describe('Library actions : ', () => {
- const username = `user-${Utils.random()}`;
-
- const adminApiActions = new AdminActions();
- const userActions = new UserActions();
-
- const loginPage = new LoginPage();
- const page = new BrowsingPage();
-
- beforeAll(async () => {
- await adminApiActions.createUser({ username });
- await userActions.login(username, username);
-
- await userActions.createSites([testData.siteInTrash.name, testData.site2InTrash.name]);
- await userActions.deleteSites([testData.siteInTrash.name, testData.site2InTrash.name], false);
-
- await loginPage.loginWith(username);
- });
-
- afterAll(async () => {
- await userActions.login(username, username);
- await userActions.emptyTrashcan();
- });
-
- describe('on Trash', () => {
- beforeAll(async () => {
- await Utils.pressEscape();
- await page.clickTrashAndWait();
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- it('[C326686] single library', async () => {
- await testUtil.checkToolbarPrimary(testData.siteInTrash.name, testData.siteInTrash.trashActions);
- await testUtil.checkContextMenu(testData.siteInTrash.name, testData.siteInTrash.trashActions);
- });
-
- it('[C326687] multiple libraries', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.siteInTrash.name, testData.site2InTrash.name], testData.trashActions);
- await testUtil.checkMultipleSelToolbarPrimary([testData.siteInTrash.name, testData.site2InTrash.name], testData.trashActions);
- });
- });
-});
diff --git a/e2e/protractor/suites/actions-available/libraries/library.test.ts b/e2e/protractor/suites/actions-available/libraries/library.test.ts
deleted file mode 100755
index 5f4c1bcfcf..0000000000
--- a/e2e/protractor/suites/actions-available/libraries/library.test.ts
+++ /dev/null
@@ -1,389 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import {
- LoginPage,
- BrowsingPage,
- SearchResultsPage,
- RepoClient,
- Utils,
- AdminActions,
- UserActions,
- SITE_VISIBILITY
-} from '@alfresco/aca-testing-shared';
-import * as testData from './test-data-libraries';
-import * as testUtil from '../test-util';
-import { Logger } from '@alfresco/adf-testing';
-
-describe('Library actions : ', () => {
- const username = `user-${Utils.random()}`;
-
- const userApi = new RepoClient(username, username);
- const adminApiActions = new AdminActions();
- const userActions = new UserActions();
-
- const loginPage = new LoginPage();
- const page = new BrowsingPage();
- const searchResultsPage = new SearchResultsPage();
- const { toolbar } = page;
- const { searchInput } = searchResultsPage.pageLayoutHeader;
-
- beforeAll(async () => {
- try {
- await adminApiActions.createUser({ username });
-
- await userApi.sites.createSite(testData.publicUserMemberFav.name);
- await userApi.sites.createSite(testData.privateUserMemberFav.name, SITE_VISIBILITY.PRIVATE);
- await userApi.sites.createSite(testData.moderatedUserMemberFav.name, SITE_VISIBILITY.MODERATED);
- const publicUserMemberNotFavId = (await userApi.sites.createSite(testData.publicUserMemberNotFav.name)).entry.guid;
- const privateUserMemberNotFavId = (await userApi.sites.createSite(testData.privateUserMemberNotFav.name, SITE_VISIBILITY.PRIVATE)).entry.guid;
- const moderatedUserMemberNotFavId = (await userApi.sites.createSite(testData.moderatedUserMemberNotFav.name, SITE_VISIBILITY.MODERATED)).entry
- .guid;
-
- await adminApiActions.sites.createSites([testData.publicNotMemberFav.name, testData.publicNotMemberNotFav.name]);
- await adminApiActions.sites.createSites(
- [
- testData.moderatedNotMemberFav.name,
- testData.moderatedNotMemberNotFav.name,
- testData.moderatedRequestedJoinFav.name,
- testData.moderatedRequestedJoinNotFav.name
- ],
- SITE_VISIBILITY.MODERATED
- );
-
- await userApi.sites.requestToJoin(testData.moderatedRequestedJoinFav.name);
- await userApi.sites.requestToJoin(testData.moderatedRequestedJoinNotFav.name);
-
- await userApi.favorites.removeFavoritesByIds([publicUserMemberNotFavId, privateUserMemberNotFavId, moderatedUserMemberNotFavId]);
- await userApi.favorites.addFavoritesByIds('site', [
- testData.publicNotMemberFav.name,
- testData.moderatedNotMemberFav.name,
- testData.moderatedRequestedJoinFav.name
- ]);
-
- await loginPage.loginWith(username);
- } catch (error) {
- Logger.error(`----- beforeAll failed : ${error}`);
- }
- });
-
- afterAll(async () => {
- await userActions.login(username, username);
- await userActions.deleteSites([
- testData.publicUserMemberFav.name,
- testData.privateUserMemberFav.name,
- testData.moderatedUserMemberFav.name,
- testData.publicUserMemberNotFav.name,
- testData.privateUserMemberNotFav.name,
- testData.moderatedUserMemberNotFav.name
- ]);
- await userActions.emptyTrashcan();
-
- await adminApiActions.login();
- await adminApiActions.deleteSites([
- testData.publicNotMemberFav.name,
- testData.moderatedNotMemberFav.name,
- testData.publicNotMemberNotFav.name,
- testData.moderatedNotMemberNotFav.name,
- testData.moderatedRequestedJoinFav.name,
- testData.moderatedRequestedJoinNotFav.name
- ]);
- });
-
- describe('on My Libraries', () => {
- beforeAll(async () => {
- await Utils.pressEscape();
- await page.goToMyLibrariesAndWait();
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- it('[C213135] Public library, user is a member, favorite', async () => {
- await testUtil.checkToolbarActions(
- testData.publicUserMemberFav.name,
- testData.publicUserMemberFav.toolbarPrimary,
- testData.publicUserMemberFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.publicUserMemberFav.name, testData.publicUserMemberFav.contextMenu);
- });
-
- it('[C290080] Private library, user is a member, favorite', async () => {
- await testUtil.checkToolbarActions(
- testData.privateUserMemberFav.name,
- testData.privateUserMemberFav.toolbarPrimary,
- testData.privateUserMemberFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.privateUserMemberFav.name, testData.privateUserMemberFav.contextMenu);
- });
-
- it('[C326676] Moderated library, user is a member, favorite', async () => {
- await testUtil.checkToolbarActions(
- testData.moderatedUserMemberFav.name,
- testData.moderatedUserMemberFav.toolbarPrimary,
- testData.moderatedUserMemberFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.moderatedUserMemberFav.name, testData.moderatedUserMemberFav.contextMenu);
- });
-
- it('[C326677] Public library, user is a member, not favorite', async () => {
- await testUtil.checkToolbarActions(
- testData.publicUserMemberNotFav.name,
- testData.publicUserMemberNotFav.toolbarPrimary,
- testData.publicUserMemberNotFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.publicUserMemberNotFav.name, testData.publicUserMemberNotFav.contextMenu);
- });
-
- it('[C326678] Private library, user is a member, not favorite', async () => {
- await testUtil.checkToolbarActions(
- testData.privateUserMemberNotFav.name,
- testData.privateUserMemberNotFav.toolbarPrimary,
- testData.privateUserMemberNotFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.privateUserMemberNotFav.name, testData.privateUserMemberNotFav.contextMenu);
- });
-
- it('[C326679] Moderated library, user is a member, not favorite', async () => {
- await testUtil.checkToolbarActions(
- testData.moderatedUserMemberNotFav.name,
- testData.moderatedUserMemberNotFav.toolbarPrimary,
- testData.moderatedUserMemberNotFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.moderatedUserMemberNotFav.name, testData.moderatedUserMemberNotFav.contextMenu);
- });
- });
-
- describe('on Favorite Libraries', () => {
- beforeAll(async () => {
- await Utils.pressEscape();
- await page.goToFavoriteLibrariesAndWait();
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- it('[C289892] Public library, user is a member, favorite', async () => {
- await testUtil.checkToolbarActions(
- testData.publicUserMemberFav.name,
- testData.publicUserMemberFav.toolbarPrimary,
- testData.publicUserMemberFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.publicUserMemberFav.name, testData.publicUserMemberFav.contextMenu);
- });
-
- it('[C290090] Private library, user is a member, favorite', async () => {
- await testUtil.checkToolbarActions(
- testData.privateUserMemberFav.name,
- testData.privateUserMemberFav.toolbarPrimary,
- testData.privateUserMemberFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.privateUserMemberFav.name, testData.privateUserMemberFav.contextMenu);
- });
-
- it('[C290091] Moderated library, user is a member, favorite', async () => {
- await testUtil.checkToolbarActions(
- testData.moderatedUserMemberFav.name,
- testData.moderatedUserMemberFav.toolbarPrimary,
- testData.moderatedUserMemberFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.moderatedUserMemberFav.name, testData.moderatedUserMemberFav.contextMenu);
- });
-
- it('[C290081] Public library, user not a member, favorite', async () => {
- await testUtil.checkToolbarActions(
- testData.publicNotMemberFav.name,
- testData.publicNotMemberFav.toolbarPrimary,
- testData.publicNotMemberFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.publicNotMemberFav.name, testData.publicNotMemberFav.contextMenu);
- });
-
- it('[C290082] Moderated library, user not a member, favorite', async () => {
- await testUtil.checkToolbarActions(
- testData.moderatedNotMemberFav.name,
- testData.moderatedNotMemberFav.toolbarPrimary,
- testData.moderatedNotMemberFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.moderatedNotMemberFav.name, testData.moderatedNotMemberFav.contextMenu);
- });
-
- it('[C290089] Moderated library, user requested to join, favorite', async () => {
- await testUtil.checkToolbarActions(
- testData.moderatedRequestedJoinFav.name,
- testData.moderatedRequestedJoinFav.toolbarPrimary,
- testData.moderatedRequestedJoinFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.moderatedRequestedJoinFav.name, testData.moderatedRequestedJoinFav.contextMenu);
- });
- });
-
- describe('on Search Results', () => {
- beforeEach(async () => {
- try {
- await Utils.pressEscape();
- await page.clickPersonalFiles();
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkLibraries();
- } catch (error) {
- Logger.error(`----- beforeEach failed : ${error}`);
- }
- });
-
- it('[C290084] Public library, user is a member, favorite', async () => {
- await searchInput.searchForLibrary(testData.publicUserMemberFav.name);
-
- await testUtil.checkToolbarActions(
- testData.publicUserMemberFav.name,
- testData.publicUserMemberFav.searchToolbarPrimary,
- testData.publicUserMemberFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.publicUserMemberFav.name, testData.publicUserMemberFav.contextMenu);
- });
-
- it('[C290085] Private library, user is a member, favorite', async () => {
- await searchInput.searchForLibrary(testData.privateUserMemberFav.name);
-
- await testUtil.checkToolbarActions(
- testData.privateUserMemberFav.name,
- testData.privateUserMemberFav.searchToolbarPrimary,
- testData.privateUserMemberFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.privateUserMemberFav.name, testData.privateUserMemberFav.contextMenu);
- });
-
- it('[C290086] Moderated library, user is a member, favorite', async () => {
- await searchInput.searchForLibrary(testData.moderatedUserMemberFav.name);
-
- await testUtil.checkToolbarActions(
- testData.moderatedUserMemberFav.name,
- testData.moderatedUserMemberFav.searchToolbarPrimary,
- testData.moderatedUserMemberFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.moderatedUserMemberFav.name, testData.moderatedUserMemberFav.contextMenu);
- });
-
- it('[C291812] Public library, user is a member, not favorite', async () => {
- await searchInput.searchForLibrary(testData.publicUserMemberNotFav.name);
-
- await testUtil.checkToolbarActions(
- testData.publicUserMemberNotFav.name,
- testData.publicUserMemberNotFav.searchToolbarPrimary,
- testData.publicUserMemberNotFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.publicUserMemberNotFav.name, testData.publicUserMemberNotFav.contextMenu);
- });
-
- it('[C291813] Private library, user is a member, not favorite', async () => {
- await searchInput.searchForLibrary(testData.privateUserMemberNotFav.name);
-
- await testUtil.checkToolbarActions(
- testData.privateUserMemberNotFav.name,
- testData.privateUserMemberNotFav.searchToolbarPrimary,
- testData.privateUserMemberNotFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.privateUserMemberNotFav.name, testData.privateUserMemberNotFav.contextMenu);
- });
-
- it('[C291814] Moderated library, user is a member, not favorite', async () => {
- await searchInput.searchForLibrary(testData.moderatedUserMemberNotFav.name);
-
- await testUtil.checkToolbarActions(
- testData.moderatedUserMemberNotFav.name,
- testData.moderatedUserMemberNotFav.searchToolbarPrimary,
- testData.moderatedUserMemberNotFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.moderatedUserMemberNotFav.name, testData.moderatedUserMemberNotFav.contextMenu);
- });
-
- it('[C326680] Public library, user not a member, favorite', async () => {
- await searchInput.searchForLibrary(testData.publicNotMemberFav.name);
-
- await testUtil.checkToolbarActions(
- testData.publicNotMemberFav.name,
- testData.publicNotMemberFav.searchToolbarPrimary,
- testData.publicNotMemberFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.publicNotMemberFav.name, testData.publicNotMemberFav.contextMenu);
- });
-
- it('[C326681] Moderated library, user not a member, favorite', async () => {
- await searchInput.searchForLibrary(testData.moderatedNotMemberFav.name);
-
- await testUtil.checkToolbarActions(
- testData.moderatedNotMemberFav.name,
- testData.moderatedNotMemberFav.searchToolbarPrimary,
- testData.moderatedNotMemberFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.moderatedNotMemberFav.name, testData.moderatedNotMemberFav.contextMenu);
- });
-
- it('[C326682] Public library, user not a member, not favorite', async () => {
- await searchInput.searchForLibrary(testData.publicNotMemberNotFav.name);
-
- await testUtil.checkToolbarActions(
- testData.publicNotMemberNotFav.name,
- testData.publicNotMemberNotFav.searchToolbarPrimary,
- testData.publicNotMemberNotFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.publicNotMemberNotFav.name, testData.publicNotMemberNotFav.contextMenu);
- });
-
- it('[C326683] Moderated library, user not a member, not favorite', async () => {
- await searchInput.searchForLibrary(testData.moderatedNotMemberNotFav.name);
-
- await testUtil.checkToolbarActions(
- testData.moderatedNotMemberNotFav.name,
- testData.moderatedNotMemberNotFav.searchToolbarPrimary,
- testData.moderatedNotMemberNotFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.moderatedNotMemberNotFav.name, testData.moderatedNotMemberNotFav.contextMenu);
- });
-
- it('[C326685] Moderated library, user requested to join, favorite', async () => {
- await searchInput.searchForLibrary(testData.moderatedRequestedJoinFav.name);
-
- await testUtil.checkToolbarActions(
- testData.moderatedRequestedJoinFav.name,
- testData.moderatedRequestedJoinFav.searchToolbarPrimary,
- testData.moderatedRequestedJoinFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.moderatedRequestedJoinFav.name, testData.moderatedRequestedJoinFav.contextMenu);
- });
-
- it('[C326684] Moderated library, user requested to join, not favorite', async () => {
- await searchInput.searchForLibrary(testData.moderatedRequestedJoinNotFav.name);
-
- await testUtil.checkToolbarActions(
- testData.moderatedRequestedJoinNotFav.name,
- testData.moderatedRequestedJoinNotFav.searchToolbarPrimary,
- testData.moderatedRequestedJoinNotFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.moderatedRequestedJoinNotFav.name, testData.moderatedRequestedJoinNotFav.contextMenu);
- });
- });
-});
diff --git a/e2e/protractor/suites/actions-available/libraries/test-data-libraries.ts b/e2e/protractor/suites/actions-available/libraries/test-data-libraries.ts
deleted file mode 100644
index 398f5f5210..0000000000
--- a/e2e/protractor/suites/actions-available/libraries/test-data-libraries.ts
+++ /dev/null
@@ -1,176 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { Utils } from '@alfresco/aca-testing-shared';
-
-// ---- multiple selection ---
-
-export const trashActions = ['Permanently Delete', 'Restore'];
-
-// ---- single selection ----
-
-const memberFavContextMenu = ['Leave Library', 'Delete', 'Remove Favorite'];
-const memberNotFavContextMenu = ['Leave Library', 'Delete', 'Favorite'];
-const memberToolbarPrimary = ['Leave Library', 'View Details', 'More Actions'];
-const favToolbarMore = ['Delete', 'Remove Favorite'];
-const notFavToolbarMore = ['Delete', 'Favorite'];
-const searchMemberToolbarPrimary = ['Leave Library', 'View Details', 'More Actions'];
-const searchReqJoinToolbarPrimary = ['Cancel Join Request', 'More Actions'];
-const searchNotMemberToolbarPrimary = ['Join', 'More Actions'];
-const reqJoinToolbarMore = ['Cancel Join Request', 'More Actions'];
-const notMemberFavContextMenu = ['Join', 'Delete', 'Remove Favorite'];
-const notMemberNotFavContextMenu = ['Join', 'Delete', 'Favorite'];
-const notMemberToolbarPrimary = ['Join', 'More Actions'];
-const reqJoinNotFavContextMenu = ['Cancel Join Request', 'Delete', 'Favorite'];
-const reqJoinFavContextMenu = ['Cancel Join Request', 'Delete', 'Remove Favorite'];
-
-export const publicUserMemberFav = {
- name: `actionsSite-public-member-fav-${Utils.random()}`,
- description: 'public site, user member, user favorite',
- contextMenu: memberFavContextMenu,
- toolbarPrimary: memberToolbarPrimary,
- toolbarMore: favToolbarMore,
-
- searchToolbarPrimary: searchMemberToolbarPrimary
-};
-
-export const privateUserMemberFav = {
- name: `actionsSite-private-member-fav-${Utils.random()}`,
- description: 'private site, user member, user favorite',
- contextMenu: memberFavContextMenu,
- toolbarPrimary: memberToolbarPrimary,
- toolbarMore: favToolbarMore,
-
- searchToolbarPrimary: searchMemberToolbarPrimary
-};
-
-export const moderatedUserMemberFav = {
- name: `actionsSite-moderated-member-fav-${Utils.random()}`,
- description: 'moderated site, user member, user favorite',
- contextMenu: memberFavContextMenu,
- toolbarPrimary: memberToolbarPrimary,
- toolbarMore: favToolbarMore,
-
- searchToolbarPrimary: searchMemberToolbarPrimary
-};
-
-export const publicUserMemberNotFav = {
- name: `actionsSite-public-member-not-fav-${Utils.random()}`,
- description: 'public site, user member, not favorite',
- contextMenu: memberNotFavContextMenu,
- toolbarPrimary: memberToolbarPrimary,
- toolbarMore: notFavToolbarMore,
-
- searchToolbarPrimary: searchMemberToolbarPrimary
-};
-
-export const privateUserMemberNotFav = {
- name: `actionsSite-private-member-not-fav-${Utils.random()}`,
- description: 'private site, user member, not favorite',
- contextMenu: memberNotFavContextMenu,
- toolbarPrimary: memberToolbarPrimary,
- toolbarMore: notFavToolbarMore,
-
- searchToolbarPrimary: searchMemberToolbarPrimary
-};
-
-export const moderatedUserMemberNotFav = {
- name: `actionsSite-moderated-member-not-fav-${Utils.random()}`,
- description: 'moderated site, user member, not favorite',
- contextMenu: memberNotFavContextMenu,
- toolbarPrimary: memberToolbarPrimary,
- toolbarMore: notFavToolbarMore,
-
- searchToolbarPrimary: searchMemberToolbarPrimary
-};
-
-export const publicNotMemberFav = {
- name: `actionsSite-public-not-member-fav-${Utils.random()}`,
- description: 'public site, user not member, user favorite',
- contextMenu: notMemberFavContextMenu,
- toolbarPrimary: notMemberToolbarPrimary,
- toolbarMore: favToolbarMore,
-
- searchToolbarPrimary: searchNotMemberToolbarPrimary
-};
-
-export const moderatedNotMemberFav = {
- name: `actionsSite-moderated-not-member-fav-${Utils.random()}`,
- description: 'moderated site, user not member, user favorite',
- contextMenu: notMemberFavContextMenu,
- toolbarPrimary: notMemberToolbarPrimary,
- toolbarMore: favToolbarMore,
-
- searchToolbarPrimary: searchNotMemberToolbarPrimary
-};
-
-export const publicNotMemberNotFav = {
- name: `actionsSite-public-not-member-not-fav-${Utils.random()}`,
- description: 'public site, user not member, not favorite',
- contextMenu: notMemberNotFavContextMenu,
- toolbarPrimary: notMemberToolbarPrimary,
- toolbarMore: notFavToolbarMore,
-
- searchToolbarPrimary: searchNotMemberToolbarPrimary
-};
-
-export const moderatedNotMemberNotFav = {
- name: `actionsSite-moderated-not-member-not-fav-${Utils.random()}`,
- description: 'moderated site, user not member, not favorite',
- contextMenu: notMemberNotFavContextMenu,
- toolbarPrimary: notMemberToolbarPrimary,
- toolbarMore: notFavToolbarMore,
-
- searchToolbarPrimary: searchNotMemberToolbarPrimary
-};
-
-export const moderatedRequestedJoinFav = {
- name: `actionsSite-moderated-req-join-fav-${Utils.random()}`,
- description: 'moderated site, user requested join, user favorite',
- contextMenu: reqJoinFavContextMenu,
- toolbarPrimary: reqJoinToolbarMore,
- toolbarMore: favToolbarMore,
-
- searchToolbarPrimary: searchReqJoinToolbarPrimary
-};
-
-export const moderatedRequestedJoinNotFav = {
- name: `actionsSite-moderated-req-join-not-fav-${Utils.random()}`,
- description: 'moderated site, user requested join, not favorite',
- contextMenu: reqJoinNotFavContextMenu,
- toolbarPrimary: reqJoinToolbarMore,
- toolbarMore: notFavToolbarMore,
-
- searchToolbarPrimary: searchReqJoinToolbarPrimary
-};
-
-export const siteInTrash = {
- name: `deleted-site-${Utils.random()}`,
- trashActions
-};
-
-export const site2InTrash = {
- name: `deleted-site2-${Utils.random()}`,
- trashActions
-};
diff --git a/e2e/protractor/suites/actions-available/new-menu/new-menu.test.ts b/e2e/protractor/suites/actions-available/new-menu/new-menu.test.ts
deleted file mode 100755
index 605f715c16..0000000000
--- a/e2e/protractor/suites/actions-available/new-menu/new-menu.test.ts
+++ /dev/null
@@ -1,94 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { AdminActions, LoginPage, BrowsingPage, SITE_ROLES, Utils, UserActions } from '@alfresco/aca-testing-shared';
-
-describe('New menu', () => {
- const username = `user-${Utils.random()}`;
-
- const siteUser = `site-user-${Utils.random()}`;
- const siteAdmin = `site-admin-${Utils.random()}`;
-
- const loginPage = new LoginPage();
- const page = new BrowsingPage();
- const { sidenav } = page;
- const { menu } = sidenav;
-
- const adminApiActions = new AdminActions();
- const userActions = new UserActions();
-
- beforeAll(async () => {
- await adminApiActions.createUser({ username });
- await userActions.login(username, username);
-
- await adminApiActions.sites.createSite(siteAdmin);
- await adminApiActions.sites.addSiteMember(siteAdmin, username, SITE_ROLES.SITE_CONSUMER.ROLE);
-
- await userActions.createSites([siteUser]);
-
- await loginPage.loginWith(username);
- });
-
- afterAll(async () => {
- await userActions.login(username, username);
- await userActions.deleteSites([siteUser]);
-
- await adminApiActions.login();
- await adminApiActions.deleteSites([siteAdmin]);
- });
-
- afterEach(async () => {
- await sidenav.closeNewMenu();
- });
-
- it('[C286524] Actions in Personal Files', async () => {
- await page.clickPersonalFiles();
- await sidenav.openNewMenu();
-
- expect(await menu.isCreateFolderEnabled()).toBe(true, 'Create Folder option not enabled');
-
- expect(await menu.isCreateFileFromTemplateEnabled()).toBe(true, 'Create file from template is not enabled');
- expect(await menu.isCreateFolderFromTemplateEnabled()).toBe(true, 'Create folder from template is not enabled');
- });
-
- it('[C280393] Actions in File Libraries - user with enough permissions', async () => {
- await page.goToMyLibrariesAndWait();
- await sidenav.openNewMenu();
-
- expect(await menu.isCreateLibraryEnabled()).toBe(true, 'Create Library option not enabled');
- });
-
- it('[C216342] Enabled actions tooltips', async () => {
- await page.clickPersonalFiles();
- await sidenav.openNewMenu();
-
- let tooltip: string;
-
- tooltip = await menu.getItemTooltip('Create Folder');
- expect(tooltip).toContain('Create new folder');
-
- tooltip = await menu.getItemTooltip('Create file from template');
- expect(tooltip).toContain('Create file from template');
- });
-});
diff --git a/e2e/protractor/suites/actions-available/special-permissions/favorites.ts b/e2e/protractor/suites/actions-available/special-permissions/favorites.ts
deleted file mode 100755
index 0c757517fd..0000000000
--- a/e2e/protractor/suites/actions-available/special-permissions/favorites.ts
+++ /dev/null
@@ -1,159 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { BrowsingPage, Utils } from '@alfresco/aca-testing-shared';
-import * as testData from './test-data-permissions';
-import * as testUtil from '../test-util';
-
-export function favoritesTests() {
- const page = new BrowsingPage();
-
- describe('available actions : ', () => {
- beforeAll(async () => {
- await page.clickFavoritesAndWait();
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- afterEach(async () => {
- await page.closeOpenDialogs();
- });
-
- describe('on a file', () => {
- it('File Office, favorite - [C286311]', async () => {
- await testUtil.checkToolbarActions(testData.fileDocxFav.name, testData.fileDocxFav.toolbarPrimary, testData.fileDocxFav.favoritesToolbarMore);
- await testUtil.checkContextMenu(testData.fileDocxFav.name, testData.fileDocxFav.favoritesContextMenu);
- });
-
- it('File favorite - [C306991]', async () => {
- await testUtil.checkToolbarActions(testData.fileFav.name, testData.fileFav.toolbarPrimary, testData.fileFav.favoritesToolbarMore);
- await testUtil.checkContextMenu(testData.fileFav.name, testData.fileFav.favoritesContextMenu);
- });
-
- it('File Office, shared, favorite - [C279187]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.toolbarPrimary,
- testData.fileDocxSharedFav.favoritesToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileDocxSharedFav.name, testData.fileDocxSharedFav.favoritesContextMenu);
- });
-
- it('File shared, favorite - [C280053]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedFav.name,
- testData.fileSharedFav.toolbarPrimary,
- testData.fileSharedFav.favoritesToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedFav.name, testData.fileSharedFav.favoritesContextMenu);
- });
-
- it('File favorite, locked - [C280050]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileFavLocked.name,
- testData.fileFavLocked.toolbarPrimary,
- testData.fileFavLocked.favoritesToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileFavLocked.name, testData.fileFavLocked.favoritesContextMenu);
- });
-
- it('File shared, favorite, locked - [C325011]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.toolbarPrimary,
- testData.fileSharedFavLocked.favoritesToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedFavLocked.name, testData.fileSharedFavLocked.favoritesContextMenu);
- });
- });
-
- describe('on a folder', () => {
- it('Folder favorite - [C325012]', async () => {
- await testUtil.checkToolbarActions(testData.folderFav.name, testData.folderFav.toolbarPrimary, testData.folderFav.favoritesToolbarMore);
- await testUtil.checkContextMenu(testData.folderFav.name, testData.folderFav.favoritesContextMenu);
- });
- });
-
- describe('on multiple selection', () => {
- it('multiple files - [C325046]', async () => {
- await testUtil.checkMultipleSelContextMenu(
- [testData.fileDocxFav.name, testData.fileDocxSharedFav.name],
- testData.multipleSelAllFav.favoritesContextMenu
- );
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileDocxFav.name, testData.fileDocxSharedFav.name],
- testData.multipleSelAllFav.toolbarPrimary,
- testData.multipleSelAllFav.favoritesToolbarMore
- );
- });
-
- it('multiple locked files - [C217145]', async () => {
- await testUtil.checkMultipleSelContextMenu(
- [testData.fileFavLocked.name, testData.fileSharedFavLocked.name],
- testData.multipleSelAllFav.favoritesContextMenu
- );
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileFavLocked.name, testData.fileSharedFavLocked.name],
- testData.multipleSelAllFav.toolbarPrimary,
- testData.multipleSelAllFav.favoritesToolbarMore
- );
- });
-
- it('multiple folders - [C213196]', async () => {
- await testUtil.checkMultipleSelContextMenu(
- [testData.folderFav.name, testData.folderFav2.name],
- testData.multipleSelAllFav.favoritesContextMenu
- );
- await testUtil.checkMultipleSelToolbarActions(
- [testData.folderFav.name, testData.folderFav2.name],
- testData.multipleSelAllFav.toolbarPrimary,
- testData.multipleSelAllFav.favoritesToolbarMore
- );
- });
-
- it('both files and folders - [C217146]', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.fileFav.name, testData.folderFav.name], testData.multipleSelAllFav.favoritesContextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileFav.name, testData.folderFav.name],
- testData.multipleSelAllFav.toolbarPrimary,
- testData.multipleSelAllFav.favoritesToolbarMore
- );
- });
-
- it('multiple files with different granular permissions - [C213193]', async () => {
- await testUtil.checkMultipleSelContextMenu(
- [testData.fileFav.name, testData.fileGranularPermission],
- testData.multipleSelAllFav.favoritesContextMenu
- );
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileFav.name, testData.fileGranularPermission],
- testData.multipleSelAllFav.toolbarPrimary,
- testData.multipleSelAllFav.favoritesToolbarMore
- );
- });
- });
- });
-}
diff --git a/e2e/protractor/suites/actions-available/special-permissions/my-libraries.ts b/e2e/protractor/suites/actions-available/special-permissions/my-libraries.ts
deleted file mode 100755
index 892911a0ef..0000000000
--- a/e2e/protractor/suites/actions-available/special-permissions/my-libraries.ts
+++ /dev/null
@@ -1,196 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { BrowsingPage, Utils } from '@alfresco/aca-testing-shared';
-import * as testData from './test-data-permissions';
-import * as testUtil from '../test-util';
-
-export function librariesTests(siteName?: string) {
- const page = new BrowsingPage();
- const { dataTable } = page;
-
- describe('available actions : ', () => {
- beforeAll(async () => {
- await page.goToMyLibrariesAndWait();
- await dataTable.doubleClickOnRowByName(siteName);
- await dataTable.waitForHeader();
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- afterEach(async () => {
- await page.closeOpenDialogs();
- });
-
- describe('on a file', () => {
- it('File Office - [C280476]', async () => {
- await testUtil.checkToolbarActions(testData.fileDocx.name, testData.fileDocx.toolbarPrimary, testData.fileDocx.toolbarMore);
- await testUtil.checkContextMenu(testData.fileDocx.name, testData.fileDocx.contextMenu);
- });
-
- it('File Office, favorite - [C280455]', async () => {
- await testUtil.checkToolbarActions(testData.fileDocxFav.name, testData.fileDocxFav.toolbarPrimary, testData.fileDocxFav.toolbarMore);
- await testUtil.checkContextMenu(testData.fileDocxFav.name, testData.fileDocxFav.contextMenu);
- });
-
- it('File simple - [C280444]', async () => {
- await testUtil.checkToolbarActions(testData.file.name, testData.file.toolbarPrimary, testData.file.toolbarMore);
- await testUtil.checkContextMenu(testData.file.name, testData.file.contextMenu);
- });
-
- it('File favorite - [C280464]', async () => {
- await testUtil.checkToolbarActions(testData.fileFav.name, testData.fileFav.toolbarPrimary, testData.fileFav.toolbarMore);
- await testUtil.checkContextMenu(testData.fileFav.name, testData.fileFav.contextMenu);
- });
-
- it('File Office, shared - [C280465]', async () => {
- await testUtil.checkToolbarActions(testData.fileDocxShared.name, testData.fileDocxShared.toolbarPrimary, testData.fileDocxShared.toolbarMore);
- await testUtil.checkContextMenu(testData.fileDocxShared.name, testData.fileDocxShared.contextMenu);
- });
-
- it('File Office, shared, favorite - [C280466]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.toolbarPrimary,
- testData.fileDocxSharedFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileDocxSharedFav.name, testData.fileDocxSharedFav.contextMenu);
- });
-
- it('File shared - [C280599]', async () => {
- await testUtil.checkToolbarActions(testData.fileShared.name, testData.fileShared.toolbarPrimary, testData.fileShared.toolbarMore);
- await testUtil.checkContextMenu(testData.fileShared.name, testData.fileShared.contextMenu);
- });
-
- it('File shared, favorite - [C280600]', async () => {
- await testUtil.checkToolbarActions(testData.fileSharedFav.name, testData.fileSharedFav.toolbarPrimary, testData.fileSharedFav.toolbarMore);
- await testUtil.checkContextMenu(testData.fileSharedFav.name, testData.fileSharedFav.contextMenu);
- });
-
- it('File locked - [C280647]', async () => {
- await testUtil.checkToolbarActions(testData.fileLocked.name, testData.fileLocked.toolbarPrimary, testData.fileLocked.toolbarMore);
- await testUtil.checkContextMenu(testData.fileLocked.name, testData.fileLocked.contextMenu);
- });
-
- it('File favorite, locked - [C280477]', async () => {
- await testUtil.checkToolbarActions(testData.fileFavLocked.name, testData.fileFavLocked.toolbarPrimary, testData.fileFavLocked.toolbarMore);
- await testUtil.checkContextMenu(testData.fileFavLocked.name, testData.fileFavLocked.contextMenu);
- });
-
- it('File shared, locked - [C280666]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedLocked.name,
- testData.fileSharedLocked.toolbarPrimary,
- testData.fileSharedLocked.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedLocked.name, testData.fileSharedLocked.contextMenu);
- });
-
- it('File shared, favorite, locked - [C280669]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.toolbarPrimary,
- testData.fileSharedFavLocked.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedFavLocked.name, testData.fileSharedFavLocked.contextMenu);
- });
- });
-
- describe('on a folder', () => {
- it('Folder not favorite - [C280456]', async () => {
- await testUtil.checkToolbarActions(testData.folder.name, testData.folder.toolbarPrimary, testData.folder.toolbarMore);
- await testUtil.checkContextMenu(testData.folder.name, testData.folder.contextMenu);
- });
-
- it('Folder favorite - [C286284]', async () => {
- await testUtil.checkToolbarActions(testData.folderFav.name, testData.folderFav.toolbarPrimary, testData.folderFav.toolbarMore);
- await testUtil.checkContextMenu(testData.folderFav.name, testData.folderFav.contextMenu);
- });
- });
-
- describe('on multiple selection', () => {
- it('multiple files - [C286264]', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.fileDocx.name, testData.fileDocxSharedFav.name], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileDocx.name, testData.fileDocxSharedFav.name],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSel.toolbarMore
- );
- });
-
- it('multiple files - all favorite - [C286283]', async () => {
- await testUtil.checkMultipleSelContextMenu(
- [testData.fileDocxFav.name, testData.fileDocxSharedFav.name],
- testData.multipleSelAllFav.contextMenu
- );
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileDocxFav.name, testData.fileDocxSharedFav.name],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSelAllFav.toolbarMore
- );
- });
-
- it('multiple locked files - [C280478]', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.fileLocked.name, testData.fileSharedFavLocked.name], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileLocked.name, testData.fileSharedFavLocked.name],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSel.toolbarMore
- );
- });
-
- it('multiple folders - [C213121]', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.folderFav.name, testData.folder.name], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.folderFav.name, testData.folder.name],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSel.toolbarMore
- );
- });
-
- it('both files and folders - [C286266]', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.file.name, testData.folder.name], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.file.name, testData.folder.name],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSel.toolbarMore
- );
- });
-
- it('multiple files with different granular permissions - [C286285]', async () => {
- await testUtil.checkMultipleSelContextMenu(
- [testData.fileDocxFav.name, testData.fileGranularPermission],
- testData.multipleSelAllFav.contextMenu
- );
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileDocxFav.name, testData.fileGranularPermission],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSelAllFav.toolbarMore
- );
- });
- });
- });
-}
diff --git a/e2e/protractor/suites/actions-available/special-permissions/search-results.ts b/e2e/protractor/suites/actions-available/special-permissions/search-results.ts
deleted file mode 100755
index 0e98142199..0000000000
--- a/e2e/protractor/suites/actions-available/special-permissions/search-results.ts
+++ /dev/null
@@ -1,243 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { BrowsingPage, SearchResultsPage, Utils } from '@alfresco/aca-testing-shared';
-import * as testData from './test-data-permissions';
-import * as testUtil from '../test-util';
-
-export function searchResultsTests() {
- const page = new BrowsingPage();
- const searchResultsPage = new SearchResultsPage();
- const { searchInput, toolbar } = page.pageLayoutHeader;
-
- describe('available actions : ', () => {
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- afterEach(async () => {
- await page.closeOpenDialogs();
- });
-
- describe('on a file', () => {
- beforeEach(async () => {
- await page.clickPersonalFiles();
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkOnlyFiles();
- await searchInput.searchFor(`*${testData.random}`);
- await searchResultsPage.waitForResults();
- });
-
- it('File Office - [C286286]', async () => {
- await testUtil.checkToolbarActions(testData.fileDocx.name, testData.fileDocx.searchToolbarPrimary, testData.fileDocx.toolbarMore);
- await testUtil.checkContextMenu(testData.fileDocx.name, testData.fileDocx.contextMenu);
- });
-
- it('File Office, favorite - [C286287]', async () => {
- await testUtil.checkToolbarActions(testData.fileDocxFav.name, testData.fileDocxFav.searchToolbarPrimary, testData.fileDocxFav.toolbarMore);
- await testUtil.checkContextMenu(testData.fileDocxFav.name, testData.fileDocxFav.contextMenu);
- });
-
- it('File simple - [C286262]', async () => {
- await testUtil.checkToolbarActions(testData.file.name, testData.file.searchToolbarPrimary, testData.file.toolbarMore);
- await testUtil.checkContextMenu(testData.file.name, testData.file.contextMenu);
- });
-
- it('File favorite - [C286263]', async () => {
- await testUtil.checkToolbarActions(testData.fileFav.name, testData.fileFav.searchToolbarPrimary, testData.fileFav.toolbarMore);
- await testUtil.checkContextMenu(testData.fileFav.name, testData.fileFav.contextMenu);
- });
-
- it('File Office, shared - [C286280]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileDocxShared.name,
- testData.fileDocxShared.searchToolbarPrimary,
- testData.fileDocxShared.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileDocxShared.name, testData.fileDocxShared.contextMenu);
- });
-
- it('File Office, shared, favorite - [C286281]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.searchToolbarPrimary,
- testData.fileDocxSharedFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileDocxSharedFav.name, testData.fileDocxSharedFav.contextMenu);
- });
-
- it('File shared - [C286282]', async () => {
- await testUtil.checkToolbarActions(testData.fileShared.name, testData.fileShared.searchToolbarPrimary, testData.fileShared.toolbarMore);
- await testUtil.checkContextMenu(testData.fileShared.name, testData.fileShared.contextMenu);
- });
-
- it('File shared, favorite - [C291823]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedFav.name,
- testData.fileSharedFav.searchToolbarPrimary,
- testData.fileSharedFav.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedFav.name, testData.fileSharedFav.contextMenu);
- });
-
- it('File locked - [C291818]', async () => {
- await testUtil.checkToolbarActions(testData.fileLocked.name, testData.fileLocked.searchToolbarPrimary, testData.fileLocked.toolbarMore);
- await testUtil.checkContextMenu(testData.fileLocked.name, testData.fileLocked.contextMenu);
- });
-
- it('File favorite, locked - [C291819]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileFavLocked.name,
- testData.fileFavLocked.searchToolbarPrimary,
- testData.fileFavLocked.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileFavLocked.name, testData.fileFavLocked.contextMenu);
- });
-
- it('File shared, locked - [C291824]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedLocked.name,
- testData.fileSharedLocked.searchToolbarPrimary,
- testData.fileSharedLocked.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedLocked.name, testData.fileSharedLocked.contextMenu);
- });
-
- it('File shared, favorite, locked - [C291825]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.searchToolbarPrimary,
- testData.fileSharedFavLocked.toolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedFavLocked.name, testData.fileSharedFavLocked.contextMenu);
- });
- });
-
- describe('on a folder', () => {
- beforeAll(async () => {
- await page.clickPersonalFiles();
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkOnlyFolders();
- await searchInput.searchFor(`*${testData.random}`);
- await searchResultsPage.waitForResults();
- });
-
- it('Folder not favorite - [C291826]', async () => {
- await testUtil.checkToolbarActions(testData.folder.name, testData.folder.searchToolbarPrimary, testData.folder.toolbarMore);
- await testUtil.checkContextMenu(testData.folder.name, testData.folder.contextMenu);
- });
-
- it('Folder favorite - [C291829]', async () => {
- await testUtil.checkToolbarActions(testData.folderFav.name, testData.folderFav.searchToolbarPrimary, testData.folderFav.toolbarMore);
- await testUtil.checkContextMenu(testData.folderFav.name, testData.folderFav.contextMenu);
- });
- });
-
- describe('on multiple selection', () => {
- describe('of files', () => {
- beforeAll(async () => {
- await page.clickPersonalFiles();
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkOnlyFiles();
- await searchInput.searchFor(`*${testData.random}`);
- await searchResultsPage.waitForResults();
- });
-
- it('multiple files - [C291830]', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.file.name, testData.fileDocxShared.name], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.file.name, testData.fileDocxShared.name],
- testData.multipleSel.searchToolbarPrimary,
- testData.multipleSel.toolbarMore
- );
- });
-
- it('multiple files - all favorite - [C291834]', async () => {
- await testUtil.checkMultipleSelContextMenu(
- [testData.fileDocxFav.name, testData.fileSharedFav.name],
- testData.multipleSelAllFav.contextMenu
- );
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileDocxFav.name, testData.fileSharedFav.name],
- testData.multipleSel.searchToolbarPrimary,
- testData.multipleSelAllFav.toolbarMore
- );
- });
-
- it('multiple locked files - [C291835]', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.fileLocked.name, testData.fileSharedFavLocked.name], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileLocked.name, testData.fileSharedFavLocked.name],
- testData.multipleSel.searchToolbarPrimary,
- testData.multipleSel.toolbarMore
- );
- });
-
- it('multiple files with different granular permissions - [C286310]', async () => {
- await testUtil.checkMultipleSelContextMenu(
- [testData.fileDocxFav.name, testData.fileGranularPermission],
- testData.multipleSelAllFav.contextMenu
- );
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileDocxFav.name, testData.fileGranularPermission],
- testData.multipleSel.searchToolbarPrimary,
- testData.multipleSelAllFav.toolbarMore
- );
- });
- });
-
- it('multiple folders - [C291836]', async () => {
- await page.clickPersonalFiles();
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkOnlyFolders();
- await searchInput.searchFor(`*${testData.random}`);
-
- await testUtil.checkMultipleSelContextMenu([testData.folder.name, testData.folderFav.name], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.folder.name, testData.folderFav.name],
- testData.multipleSel.searchToolbarPrimary,
- testData.multipleSel.toolbarMore
- );
- });
-
- it('both files and folders - [C268128]', async () => {
- await page.clickPersonalFiles();
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.searchFor(`${testData.file.name} or ${testData.folderFav.name}`);
-
- await testUtil.checkMultipleSelContextMenu([testData.file.name, testData.folderFav.name], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.file.name, testData.folderFav.name],
- testData.multipleSel.searchToolbarPrimary,
- testData.multipleSel.toolbarMore
- );
- });
- });
- });
-}
diff --git a/e2e/protractor/suites/actions-available/special-permissions/shared-files.ts b/e2e/protractor/suites/actions-available/special-permissions/shared-files.ts
deleted file mode 100755
index 2475115509..0000000000
--- a/e2e/protractor/suites/actions-available/special-permissions/shared-files.ts
+++ /dev/null
@@ -1,144 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { BrowsingPage, Utils } from '@alfresco/aca-testing-shared';
-import * as testData from './test-data-permissions';
-import * as testUtil from '../test-util';
-
-export function sharedFilesTests() {
- const page = new BrowsingPage();
-
- describe('available actions : ', () => {
- beforeAll(async () => {
- await page.clickSharedFilesAndWait();
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- afterEach(async () => {
- await page.closeOpenDialogs();
- });
-
- describe('single selection', () => {
- it('File Office, shared - [C326626]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileDocxShared.name,
- testData.fileDocxShared.toolbarPrimary,
- testData.fileDocxShared.sharedToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileDocxShared.name, testData.fileDocxShared.sharedContextMenu);
- });
-
- it('File Office, shared, favorite - [C326627]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.toolbarPrimary,
- testData.fileDocxSharedFav.sharedToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileDocxSharedFav.name, testData.fileDocxSharedFav.sharedContextMenu);
- });
-
- it('File shared - [C326628]', async () => {
- await testUtil.checkToolbarActions(testData.fileShared.name, testData.fileShared.toolbarPrimary, testData.fileShared.sharedToolbarMore);
- await testUtil.checkContextMenu(testData.fileShared.name, testData.fileShared.sharedContextMenu);
- });
-
- it('File shared, favorite - [C326629]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedFav.name,
- testData.fileSharedFav.toolbarPrimary,
- testData.fileSharedFav.sharedToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedFav.name, testData.fileSharedFav.sharedContextMenu);
- });
-
- it('File shared, locked - [C326631]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedLocked.name,
- testData.fileSharedLocked.toolbarPrimary,
- testData.fileSharedLocked.sharedToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedLocked.name, testData.fileSharedLocked.sharedContextMenu);
- });
-
- it('File shared, favorite, locked - [C326632]', async () => {
- await testUtil.checkToolbarActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.toolbarPrimary,
- testData.fileSharedFavLocked.sharedToolbarMore
- );
- await testUtil.checkContextMenu(testData.fileSharedFavLocked.name, testData.fileSharedFavLocked.sharedContextMenu);
- });
- });
-
- describe('multiple selection', () => {
- it('multiple files - [C326634]', async () => {
- await testUtil.checkMultipleSelContextMenu([testData.fileShared.name, testData.fileSharedFav.name], testData.multipleSel.contextMenu);
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileShared.name, testData.fileSharedFav.name],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSel.toolbarMore
- );
- });
-
- it('multiple files - all favorite - [C326635]', async () => {
- await testUtil.checkMultipleSelContextMenu(
- [testData.fileSharedFav.name, testData.fileSharedFavLocked.name],
- testData.multipleSelAllFav.contextMenu
- );
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileSharedFav.name, testData.fileSharedFavLocked.name],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSelAllFav.toolbarMore
- );
- });
-
- it('multiple locked files - [C326636]', async () => {
- await testUtil.checkMultipleSelContextMenu(
- [testData.fileSharedLocked.name, testData.fileSharedFavLocked.name],
- testData.multipleSel.contextMenu
- );
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileSharedLocked.name, testData.fileSharedFavLocked.name],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSel.toolbarMore
- );
- });
-
- it('multiple files with different granular permissions - [C326639]', async () => {
- await testUtil.checkMultipleSelContextMenu(
- [testData.fileSharedFav.name, testData.fileGranularPermission],
- testData.multipleSelAllFav.contextMenu
- );
- await testUtil.checkMultipleSelToolbarActions(
- [testData.fileSharedFav.name, testData.fileGranularPermission],
- testData.multipleSel.toolbarPrimary,
- testData.multipleSelAllFav.toolbarMore
- );
- });
- });
- });
-}
diff --git a/e2e/protractor/suites/actions-available/special-permissions/special-permissions-actions.test.ts b/e2e/protractor/suites/actions-available/special-permissions/special-permissions-actions.test.ts
deleted file mode 100644
index 269ec5dbe9..0000000000
--- a/e2e/protractor/suites/actions-available/special-permissions/special-permissions-actions.test.ts
+++ /dev/null
@@ -1,178 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { LoginPage, RepoClient, Utils, AdminActions, FILES, SITE_ROLES, SITE_VISIBILITY, UserActions } from '@alfresco/aca-testing-shared';
-import * as testData from './test-data-permissions';
-import { librariesTests } from './my-libraries';
-import { favoritesTests } from './favorites';
-import { searchResultsTests } from './search-results';
-import { sharedFilesTests } from './shared-files';
-
-describe('Special permissions : ', () => {
- const random = testData.random;
-
- const sitePrivate = `site-private-${random}`;
-
- const userManager = `manager-${random}`;
- const userConsumer = `consumer-${random}`;
- const userDemoted = `demoted-${random}`;
-
- let fileDocxFavId: string;
- let fileFavId: string;
- let fileDocxSharedId: string;
- let fileDocxSharedFavId: string;
- let fileSharedId: string;
- let fileSharedFavId: string;
- let fileLockedId: string;
- let fileFavLockedId: string;
- let fileSharedLockedId: string;
- let fileSharedFavLockedId: string;
- let fileGranularPermissionId: string;
- let fileLockedByUserId: string;
- let folderFavId: string;
- let folderFav2Id: string;
-
- const adminApiActions = new AdminActions();
- const managerActions = new UserActions();
- const demotedUserActions = new UserActions();
-
- const userManagerApi = new RepoClient(userManager, userManager);
- const userConsumerApi = new RepoClient(userConsumer, userConsumer);
- const userDemotedApi = new RepoClient(userDemoted, userDemoted);
-
- const loginPage = new LoginPage();
-
- beforeAll(async () => {
- await adminApiActions.createUser({ username: userManager });
- await adminApiActions.createUser({ username: userConsumer });
- await adminApiActions.createUser({ username: userDemoted });
-
- await managerActions.login(userManager, userManager);
- await demotedUserActions.login(userDemoted, userDemoted);
-
- const consumerFavoritesTotalItems = await userConsumerApi.favorites.getFavoritesTotalItems();
- const managerSearchTotalItems = await userManagerApi.search.getTotalItems(userManager);
-
- await userManagerApi.sites.createSite(sitePrivate, SITE_VISIBILITY.PRIVATE);
- const docLibId = await userManagerApi.sites.getDocLibId(sitePrivate);
- await userManagerApi.sites.addSiteConsumer(sitePrivate, userConsumer);
- await userManagerApi.sites.addSiteManager(sitePrivate, userDemoted);
-
- await userManagerApi.upload.uploadFileWithRename(FILES.docxFile, docLibId, testData.fileDocx.name);
- fileDocxFavId = (await userManagerApi.upload.uploadFileWithRename(FILES.docxFile, docLibId, testData.fileDocxFav.name)).entry.id;
- await userManagerApi.createFile(testData.file.name, docLibId);
- fileFavId = await userManagerApi.createFile(testData.fileFav.name, docLibId);
- fileDocxSharedId = (await userManagerApi.upload.uploadFileWithRename(FILES.docxFile, docLibId, testData.fileDocxShared.name)).entry.id;
- fileDocxSharedFavId = (await userManagerApi.upload.uploadFileWithRename(FILES.docxFile, docLibId, testData.fileDocxSharedFav.name)).entry.id;
- fileSharedId = await userManagerApi.createFile(testData.fileShared.name, docLibId);
- fileSharedFavId = await userManagerApi.createFile(testData.fileSharedFav.name, docLibId);
- fileLockedId = await userManagerApi.createFile(testData.fileLocked.name, docLibId);
- fileFavLockedId = await userManagerApi.createFile(testData.fileFavLocked.name, docLibId);
- fileSharedLockedId = await userManagerApi.createFile(testData.fileSharedLocked.name, docLibId);
- fileSharedFavLockedId = await userManagerApi.createFile(testData.fileSharedFavLocked.name, docLibId);
- fileGranularPermissionId = await userManagerApi.createFile(testData.fileGranularPermission, docLibId);
-
- fileLockedByUserId = await userManagerApi.createFile(testData.fileLockedByUser, docLibId);
- await demotedUserActions.lockNodes([fileLockedByUserId]);
- await userDemotedApi.favorites.addFavoriteById('file', fileLockedByUserId);
- await userDemotedApi.shared.shareFilesByIds([fileLockedByUserId]);
- await userManagerApi.sites.updateSiteMember(sitePrivate, userDemoted, SITE_ROLES.SITE_CONSUMER.ROLE);
-
- await userManagerApi.nodes.createFolder(testData.folder.name, docLibId);
- folderFavId = await userManagerApi.createFolder(testData.folderFav.name, docLibId);
- folderFav2Id = await userManagerApi.createFolder(testData.folderFav2.name, docLibId);
- await userConsumerApi.favorites.addFavoritesByIds('folder', [folderFavId, folderFav2Id]);
-
- await userConsumerApi.favorites.addFavoritesByIds('file', [
- fileDocxFavId,
- fileFavId,
- fileDocxSharedFavId,
- fileSharedFavId,
- fileFavLockedId,
- fileSharedFavLockedId,
- fileGranularPermissionId
- ]);
-
- await userConsumerApi.shared.shareFilesByIds([
- fileDocxSharedId,
- fileDocxSharedFavId,
- fileSharedId,
- fileSharedFavId,
- fileSharedLockedId,
- fileSharedFavLockedId,
- fileGranularPermissionId
- ]);
-
- await managerActions.lockNodes([fileLockedId, fileFavLockedId, fileSharedLockedId, fileSharedFavLockedId]);
-
- await userManagerApi.nodes.setGranularPermission(fileGranularPermissionId, false, userConsumer, SITE_ROLES.SITE_MANAGER.ROLE);
-
- await userManagerApi.favorites.addFavoriteById('file', fileLockedByUserId);
-
- await Promise.all([
- userConsumerApi.favorites.waitForApi({ expect: consumerFavoritesTotalItems + 9 }),
- userManagerApi.shared.waitForFilesToBeShared([
- fileDocxSharedId,
- fileDocxSharedFavId,
- fileSharedId,
- fileSharedFavId,
- fileSharedLockedId,
- fileSharedFavLockedId,
- fileGranularPermissionId,
- fileLockedByUserId
- ]),
- userManagerApi.search.waitForApi(userManager, { expect: managerSearchTotalItems + 14 })
- ]);
- });
-
- afterAll(async () => {
- await userManagerApi.sites.deleteSite(sitePrivate);
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- describe('Consumer', () => {
- beforeAll(async () => {
- await loginPage.loginWith(userConsumer);
- });
-
- describe('on File Libraries', () => {
- librariesTests(sitePrivate);
- });
-
- describe('on Favorites', () => {
- favoritesTests();
- });
-
- describe('on Search Results', () => {
- searchResultsTests();
- });
-
- describe('on Shared Files', () => {
- sharedFilesTests();
- });
- });
-});
diff --git a/e2e/protractor/suites/actions-available/special-permissions/test-data-permissions.ts b/e2e/protractor/suites/actions-available/special-permissions/test-data-permissions.ts
deleted file mode 100644
index a38809c049..0000000000
--- a/e2e/protractor/suites/actions-available/special-permissions/test-data-permissions.ts
+++ /dev/null
@@ -1,404 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { Utils } from '@alfresco/aca-testing-shared';
-
-export const random = Utils.random();
-
-// ----- files -----
-
-const consumerContextMenu = ['Share', 'Download', 'View', 'Favorite', 'Copy', 'Manage Versions'];
-const consumerFavContextMenu = ['Share', 'Download', 'View', 'Remove Favorite', 'Copy', 'Manage Versions'];
-const consumerSharedContextMenu = ['Shared Link Settings', 'Download', 'View', 'Favorite', 'Copy', 'Manage Versions'];
-const consumerSharedFavContextMenu = ['Shared Link Settings', 'Download', 'View', 'Remove Favorite', 'Copy', 'Manage Versions'];
-
-const consumerToolbarPrimary = ['Share', 'Download', 'View', 'View Details', 'More Actions'];
-const consumerSharedToolbarPrimary = ['Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];
-
-const searchConsumerToolbarPrimary = ['Share', 'Download', 'View', 'View Details', 'More Actions'];
-const searchConsumerSharedToolbarPrimary = ['Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];
-
-const consumerToolbarMore = ['Favorite', 'Copy', 'Manage Versions'];
-const consumerFavToolbarMore = ['Remove Favorite', 'Copy', 'Manage Versions'];
-
-// ---- VIEWER ----
-
-const consumerViewerSharedToolbarPrimary = ['Activate full-screen mode', 'Shared Link Settings', 'Download', 'Print', 'View Details', 'More Actions'];
-const consumerViewerToolbarPrimary = ['Activate full-screen mode', 'Share', 'Download', 'Print', 'View Details', 'More Actions'];
-const consumerViewerFavToolbarMore = ['Remove Favorite', 'Copy', 'Manage Versions'];
-const consumerViewerToolbarMore = ['Favorite', 'Copy', 'Manage Versions'];
-
-// ---- FAVORITES workarounds ----
-
-// TODO: remove 'Move' and 'Delete' when ACA-1737 is done
-// TODO: investigate why 'Upload New Version' appears and raise issue
-const favoritesConsumerToolbarMore = ['Upload New Version', 'Remove Favorite', 'Move', 'Copy', 'Delete', 'Manage Versions'];
-// TODO: remove 'Move' and 'Delete' when ACA-1737 is done
-// TODO: investigate why 'Upload New Version' appears and raise issue
-const favoritesConsumerContextMenu = [
- 'Share',
- 'Download',
- 'View',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions'
-];
-// TODO: remove 'Move' and 'Delete' when ACA-1737 is done
-// TODO: investigate why 'Upload New Version' appears and raise issue
-const favoritesConsumerSharedContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Upload New Version',
- 'Remove Favorite',
- 'Move',
- 'Copy',
- 'Delete',
- 'Manage Versions'
-];
-
-// ---- SHARED FILES workaround ----
-
-// TODO: investigate why 'Upload New Version' appears and raise issue
-const sharedConsumerToolbarMore = ['Upload New Version', 'Favorite', 'Copy', 'Manage Versions'];
-// TODO: investigate why 'Cancel Editing' appears and raise issue
-// TODO: investigate why 'Upload New Version' appears and raise issue
-const sharedConsumerLockedToolbarMore = ['Cancel Editing', 'Upload New Version', 'Favorite', 'Copy', 'Manage Versions'];
-// TODO: investigate why 'Upload New Version' appears and raise issue
-const sharedConsumerFavToolbarMore = ['Upload New Version', 'Remove Favorite', 'Copy', 'Manage Versions'];
-// TODO: investigate why 'Cancel Editing' appears and raise issue
-// TODO: investigate why 'Upload New Version' appears and raise issue
-const sharedConsumerFavLockedToolbarMore = ['Cancel Editing', 'Upload New Version', 'Remove Favorite', 'Copy', 'Manage Versions'];
-// TODO: investigate why 'Upload New Version' appears and raise issue
-const sharedConsumerContextMenu = ['Shared Link Settings', 'Download', 'View', 'Upload New Version', 'Favorite', 'Copy', 'Manage Versions'];
-// TODO: investigate why 'Cancel Editing' appears and raise issue
-// TODO: investigate why 'Upload New Version' appears and raise issue
-const sharedConsumerLockedContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Cancel Editing',
- 'Upload New Version',
- 'Favorite',
- 'Copy',
- 'Manage Versions'
-];
-// TODO: investigate why 'Upload New Version' appears and raise issue
-const sharedConsumerFavContextMenu = ['Shared Link Settings', 'Download', 'View', 'Upload New Version', 'Remove Favorite', 'Copy', 'Manage Versions'];
-// TODO: investigate why 'Cancel Editing' appears and raise issue
-// TODO: investigate why 'Upload New Version' appears and raise issue
-const sharedConsumerFavLockedContextMenu = [
- 'Shared Link Settings',
- 'Download',
- 'View',
- 'Cancel Editing',
- 'Upload New Version',
- 'Remove Favorite',
- 'Copy',
- 'Manage Versions'
-];
-
-export const fileDocx = {
- name: `file-${random}-docx.docx`,
- description: 'file not shared, not fav, office, not locked',
-
- contextMenu: consumerContextMenu,
- toolbarPrimary: consumerToolbarPrimary,
- toolbarMore: consumerToolbarMore,
- viewerToolbarPrimary: consumerViewerToolbarPrimary,
- viewerToolbarMore: consumerViewerToolbarMore,
-
- searchToolbarPrimary: searchConsumerToolbarPrimary
-};
-
-export const fileDocxFav = {
- name: `file-${random}-docx-fav.docx`,
- description: 'file not shared, fav, office, not locked',
-
- contextMenu: consumerFavContextMenu,
- toolbarPrimary: consumerToolbarPrimary,
- toolbarMore: consumerFavToolbarMore,
- viewerToolbarPrimary: consumerViewerToolbarPrimary,
- viewerToolbarMore: consumerViewerFavToolbarMore,
-
- favoritesToolbarMore: favoritesConsumerToolbarMore,
- favoritesContextMenu: favoritesConsumerContextMenu,
-
- searchToolbarPrimary: searchConsumerToolbarPrimary
-};
-
-export const file = {
- name: `file-${random}.txt`,
- description: 'file not shared, not fav, not office, not locked',
-
- contextMenu: consumerContextMenu,
- toolbarPrimary: consumerToolbarPrimary,
- toolbarMore: consumerToolbarMore,
- viewerToolbarPrimary: consumerViewerToolbarPrimary,
- viewerToolbarMore: consumerViewerToolbarMore,
-
- searchToolbarPrimary: searchConsumerToolbarPrimary
-};
-
-export const fileFav = {
- name: `file-${random}-fav.txt`,
- description: 'file not shared, fav, not office, not locked',
-
- contextMenu: consumerFavContextMenu,
- toolbarPrimary: consumerToolbarPrimary,
- toolbarMore: consumerFavToolbarMore,
- viewerToolbarPrimary: consumerViewerToolbarPrimary,
- viewerToolbarMore: consumerViewerFavToolbarMore,
-
- favoritesToolbarMore: favoritesConsumerToolbarMore,
- favoritesContextMenu: favoritesConsumerContextMenu,
-
- searchToolbarPrimary: searchConsumerToolbarPrimary
-};
-
-export const fileDocxShared = {
- name: `file-${random}-docx-shared.docx`,
- description: 'file shared, not fav, office, not locked',
-
- contextMenu: consumerSharedContextMenu,
- toolbarPrimary: consumerSharedToolbarPrimary,
- toolbarMore: consumerToolbarMore,
- viewerToolbarPrimary: consumerViewerSharedToolbarPrimary,
- viewerToolbarMore: consumerViewerToolbarMore,
-
- sharedToolbarMore: sharedConsumerToolbarMore,
- sharedContextMenu: sharedConsumerContextMenu,
-
- searchToolbarPrimary: searchConsumerSharedToolbarPrimary
-};
-
-export const fileDocxSharedFav = {
- name: `file-${random}-docx-shared-fav.docx`,
- description: 'file shared, fav, office, not locked',
-
- contextMenu: consumerSharedFavContextMenu,
- toolbarPrimary: consumerSharedToolbarPrimary,
- toolbarMore: consumerFavToolbarMore,
- viewerToolbarPrimary: consumerViewerSharedToolbarPrimary,
- viewerToolbarMore: consumerViewerFavToolbarMore,
-
- favoritesToolbarMore: favoritesConsumerToolbarMore,
- favoritesContextMenu: favoritesConsumerSharedContextMenu,
-
- sharedToolbarMore: sharedConsumerFavToolbarMore,
- sharedContextMenu: sharedConsumerFavContextMenu,
-
- searchToolbarPrimary: searchConsumerSharedToolbarPrimary
-};
-
-export const fileShared = {
- name: `file-${random}-shared.txt`,
- description: 'file shared, not fav, not office, not locked',
-
- contextMenu: consumerSharedContextMenu,
- toolbarPrimary: consumerSharedToolbarPrimary,
- toolbarMore: consumerToolbarMore,
- viewerToolbarPrimary: consumerViewerSharedToolbarPrimary,
- viewerToolbarMore: consumerViewerToolbarMore,
-
- sharedToolbarMore: sharedConsumerToolbarMore,
- sharedContextMenu: sharedConsumerContextMenu,
-
- searchToolbarPrimary: searchConsumerSharedToolbarPrimary
-};
-
-export const fileSharedFav = {
- name: `file-${random}-shared-fav.txt`,
- description: 'file shared, fav, not office, not locked',
-
- contextMenu: consumerSharedFavContextMenu,
- toolbarPrimary: consumerSharedToolbarPrimary,
- toolbarMore: consumerFavToolbarMore,
- viewerToolbarPrimary: consumerViewerSharedToolbarPrimary,
- viewerToolbarMore: consumerViewerFavToolbarMore,
-
- favoritesToolbarMore: favoritesConsumerToolbarMore,
- favoritesContextMenu: favoritesConsumerSharedContextMenu,
-
- sharedToolbarMore: sharedConsumerFavToolbarMore,
- sharedContextMenu: sharedConsumerFavContextMenu,
-
- searchToolbarPrimary: searchConsumerSharedToolbarPrimary
-};
-
-export const fileLocked = {
- name: `file-${random}-locked.txt`,
- description: 'file not shared, not fav, not office, locked',
-
- contextMenu: consumerContextMenu,
- toolbarPrimary: consumerToolbarPrimary,
- toolbarMore: consumerToolbarMore,
- viewerToolbarPrimary: consumerViewerToolbarPrimary,
- viewerToolbarMore: consumerViewerToolbarMore,
-
- searchToolbarPrimary: searchConsumerToolbarPrimary
-};
-
-export const fileFavLocked = {
- name: `file-${random}-fav-locked.txt`,
- description: 'file not shared, fav, not office, locked',
-
- contextMenu: consumerFavContextMenu,
- toolbarPrimary: consumerToolbarPrimary,
- toolbarMore: consumerFavToolbarMore,
- viewerToolbarPrimary: consumerViewerToolbarPrimary,
- viewerToolbarMore: consumerViewerFavToolbarMore,
-
- favoritesToolbarMore: favoritesConsumerToolbarMore,
- favoritesContextMenu: favoritesConsumerContextMenu,
-
- searchToolbarPrimary: searchConsumerToolbarPrimary
-};
-
-export const fileSharedLocked = {
- name: `file-${random}-shared-locked.txt`,
- description: 'file shared, not fav, not office, locked',
-
- contextMenu: consumerSharedContextMenu,
- toolbarPrimary: consumerSharedToolbarPrimary,
- toolbarMore: consumerToolbarMore,
- viewerToolbarPrimary: consumerViewerSharedToolbarPrimary,
- viewerToolbarMore: consumerViewerToolbarMore,
-
- sharedToolbarMore: sharedConsumerLockedToolbarMore,
- sharedContextMenu: sharedConsumerLockedContextMenu,
-
- searchToolbarPrimary: searchConsumerSharedToolbarPrimary
-};
-
-export const fileSharedFavLocked = {
- name: `file-${random}-shared-fav-locked.txt`,
- description: 'file shared, fav, not office, locked',
-
- contextMenu: consumerSharedFavContextMenu,
- toolbarPrimary: consumerSharedToolbarPrimary,
- toolbarMore: consumerFavToolbarMore,
- viewerToolbarPrimary: consumerViewerSharedToolbarPrimary,
- viewerToolbarMore: consumerViewerFavToolbarMore,
-
- favoritesToolbarMore: favoritesConsumerToolbarMore,
- favoritesContextMenu: favoritesConsumerSharedContextMenu,
-
- sharedToolbarMore: sharedConsumerFavLockedToolbarMore,
- sharedContextMenu: sharedConsumerFavLockedContextMenu,
-
- searchToolbarPrimary: searchConsumerSharedToolbarPrimary
-};
-
-export const fileGranularPermission = `file-${random}-granular.txt`;
-export const fileLockedByUser = `file-${random}-my-locked.txt`;
-
-// ---- folders ---
-
-const consumerFolderContextMenu = ['Download', 'Favorite', 'Copy'];
-const consumerFolderToolbarPrimary = ['Download', 'View Details', 'More Actions'];
-const consumerFolderToolbarMore = ['Favorite', 'Copy'];
-const searchConsumerFolderToolbarPrimary = ['Download', 'View Details', 'More Actions'];
-const consumerFolderFavContextMenu = ['Download', 'Remove Favorite', 'Copy'];
-const consumerFolderFavToolbarMore = ['Remove Favorite', 'Copy'];
-
-// ---- FAVORITES workarounds ----
-
-// TODO: remove 'Edit', 'Move' and 'Delete' when ACA-1737 is done
-const favoritesConsumerFolderContextMenu = ['Download', 'Edit', 'Remove Favorite', 'Move', 'Copy', 'Delete'];
-// TODO: remove 'Edit', 'Move' and 'Delete' when ACA-1737 is done
-const favoritesConsumerFolderToolbarMore = ['Edit', 'Remove Favorite', 'Move', 'Copy', 'Delete'];
-
-export const folder = {
- name: `folder-${random}`,
- description: 'folder not favorite',
- contextMenu: consumerFolderContextMenu,
- toolbarPrimary: consumerFolderToolbarPrimary,
- toolbarMore: consumerFolderToolbarMore,
-
- searchToolbarPrimary: searchConsumerFolderToolbarPrimary
-};
-
-export const folderFav = {
- name: `folder-fav-${random}`,
- description: 'folder favorite',
- contextMenu: consumerFolderFavContextMenu,
- toolbarPrimary: consumerFolderToolbarPrimary,
- toolbarMore: consumerFolderFavToolbarMore,
-
- favoritesContextMenu: favoritesConsumerFolderContextMenu,
- favoritesToolbarMore: favoritesConsumerFolderToolbarMore,
-
- searchToolbarPrimary: searchConsumerFolderToolbarPrimary
-};
-
-export const folderFav2 = {
- name: `folder-fav-2-${random}`,
- description: 'folder 2 favorite'
-};
-
-// ---- multiple selection ---
-
-const multipleSelContextMenu = ['Download', 'Favorite', 'Copy'];
-const multipleSelAllFavContextMenu = ['Download', 'Remove Favorite', 'Copy'];
-const multipleSelToolbarPrimary = ['Download', 'View Details', 'More Actions'];
-const multipleSelToolbarMore = ['Favorite', 'Copy'];
-const multipleSelAllFavToolbarMore = ['Remove Favorite', 'Copy'];
-const searchMultipleSelToolbarPrimary = ['Download', 'View Details', 'More Actions'];
-
-// ---- FAVORITES workarounds ----
-
-// TODO: remove 'Move' and 'Delete' when ACA-1737 is done
-const favoritesMultipleSelContextMenu = ['Download', 'Favorite', 'Move', 'Copy', 'Delete'];
-// TODO: remove 'Move' and 'Delete' when ACA-1737 is done
-const favoritesMultipleSelToolbarMore = ['Favorite', 'Move', 'Copy', 'Delete'];
-// TODO: remove 'Move' and 'Delete' when ACA-1737 is done
-const favoritesMultipleSelAllFavContextMenu = ['Download', 'Remove Favorite', 'Move', 'Copy', 'Delete'];
-// TODO: remove 'Move' and 'Delete' when ACA-1737 is done
-const favoritesMultipleSelAllFavToolbarMore = ['Remove Favorite', 'Move', 'Copy', 'Delete'];
-
-export const multipleSel = {
- contextMenu: multipleSelContextMenu,
- toolbarPrimary: multipleSelToolbarPrimary,
- toolbarMore: multipleSelToolbarMore,
-
- favoritesContextMenu: favoritesMultipleSelContextMenu,
- favoritesToolbarMore: favoritesMultipleSelToolbarMore,
-
- searchToolbarPrimary: searchMultipleSelToolbarPrimary
-};
-
-export const multipleSelAllFav = {
- contextMenu: multipleSelAllFavContextMenu,
- toolbarPrimary: multipleSelToolbarPrimary,
- toolbarMore: multipleSelAllFavToolbarMore,
-
- favoritesContextMenu: favoritesMultipleSelAllFavContextMenu,
- favoritesToolbarMore: favoritesMultipleSelAllFavToolbarMore,
-
- searchToolbarPrimary: searchMultipleSelToolbarPrimary
-};
diff --git a/e2e/protractor/suites/actions-available/special-permissions/viewer.ts b/e2e/protractor/suites/actions-available/special-permissions/viewer.ts
deleted file mode 100755
index 4786467b68..0000000000
--- a/e2e/protractor/suites/actions-available/special-permissions/viewer.ts
+++ /dev/null
@@ -1,314 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { BrowsingPage, SearchResultsPage, Utils } from '@alfresco/aca-testing-shared';
-import * as testData from './test-data-permissions';
-import * as testUtil from '../test-util';
-
-export function viewerTests(siteName?: string) {
- const page = new BrowsingPage();
- const searchResultsPage = new SearchResultsPage();
- const { dataTable, toolbar } = page;
- const { searchInput } = page.pageLayoutHeader;
-
- describe('available actions : ', () => {
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- afterEach(async () => {
- await page.closeOpenDialogs();
- });
-
- describe('file opened from File Libraries', () => {
- beforeAll(async () => {
- await page.goToMyLibrariesAndWait();
- await dataTable.doubleClickOnRowByName(siteName);
- await dataTable.waitForHeader();
- });
-
- it('File Office - [C326622]', async () => {
- await testUtil.checkViewerActions(testData.fileDocx.name, testData.fileDocx.viewerToolbarPrimary, testData.fileDocx.viewerToolbarMore);
- });
-
- it('File Office, favorite - [C326623]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxFav.name,
- testData.fileDocxFav.viewerToolbarPrimary,
- testData.fileDocxFav.viewerToolbarMore
- );
- });
-
- it('File simple - [C326624]', async () => {
- await testUtil.checkViewerActions(testData.file.name, testData.file.viewerToolbarPrimary, testData.file.viewerToolbarMore);
- });
-
- it('File favorite - [C326625]', async () => {
- await testUtil.checkViewerActions(testData.fileFav.name, testData.fileFav.viewerToolbarPrimary, testData.fileFav.viewerToolbarMore);
- });
-
- it('File Office, shared - [C326637]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxShared.name,
- testData.fileDocxShared.viewerToolbarPrimary,
- testData.fileDocxShared.viewerToolbarMore
- );
- });
-
- it('File Office, shared, favorite - [C326638]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.viewerToolbarPrimary,
- testData.fileDocxSharedFav.viewerToolbarMore
- );
- });
-
- it('File shared - [C326648]', async () => {
- await testUtil.checkViewerActions(testData.fileShared.name, testData.fileShared.viewerToolbarPrimary, testData.fileShared.viewerToolbarMore);
- });
-
- it('File shared, favorite - [C326649]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFav.name,
- testData.fileSharedFav.viewerToolbarPrimary,
- testData.fileSharedFav.viewerToolbarMore
- );
- });
-
- it('File locked - [C326630]', async () => {
- await testUtil.checkViewerActions(testData.fileLocked.name, testData.fileLocked.viewerToolbarPrimary, testData.fileLocked.viewerToolbarMore);
- });
-
- it('File favorite, locked - [C326633]', async () => {
- await testUtil.checkViewerActions(
- testData.fileFavLocked.name,
- testData.fileFavLocked.viewerToolbarPrimary,
- testData.fileFavLocked.viewerToolbarMore
- );
- });
-
- it('File shared, locked - [C326650]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedLocked.name,
- testData.fileSharedLocked.viewerToolbarPrimary,
- testData.fileSharedLocked.viewerToolbarMore
- );
- });
-
- it('File shared, favorite, locked - [C326651]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.viewerToolbarPrimary,
- testData.fileSharedFavLocked.viewerToolbarMore
- );
- });
- });
-
- describe('file opened from Favorites', () => {
- beforeAll(async () => {
- await page.clickFavoritesAndWait();
- });
-
- it('File Office, favorite - [C326652]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxFav.name,
- testData.fileDocxFav.viewerToolbarPrimary,
- testData.fileDocxFav.viewerToolbarMore
- );
- });
-
- it('File favorite - [C326653]', async () => {
- await testUtil.checkViewerActions(testData.fileFav.name, testData.fileFav.viewerToolbarPrimary, testData.fileFav.viewerToolbarMore);
- });
-
- it('File Office, shared, favorite - [C326655]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.viewerToolbarPrimary,
- testData.fileDocxSharedFav.viewerToolbarMore
- );
- });
-
- it('File shared, favorite - [C326656]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFav.name,
- testData.fileSharedFav.viewerToolbarPrimary,
- testData.fileSharedFav.viewerToolbarMore
- );
- });
-
- it('File favorite, locked - [C326654]', async () => {
- await testUtil.checkViewerActions(
- testData.fileFavLocked.name,
- testData.fileFavLocked.viewerToolbarPrimary,
- testData.fileFavLocked.viewerToolbarMore
- );
- });
-
- it('File shared, favorite, locked - [C326657]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.viewerToolbarPrimary,
- testData.fileSharedFavLocked.viewerToolbarMore
- );
- });
- });
-
- describe('file opened from Shared Files', () => {
- beforeAll(async () => {
- await page.clickSharedFilesAndWait();
- });
-
- it('File Office, shared - [C326658]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxShared.name,
- testData.fileDocxShared.viewerToolbarPrimary,
- testData.fileDocxShared.viewerToolbarMore
- );
- });
-
- it('File Office, shared, favorite - [C326659]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.viewerToolbarPrimary,
- testData.fileDocxSharedFav.viewerToolbarMore
- );
- });
-
- it('File shared - [C326660]', async () => {
- await testUtil.checkViewerActions(testData.fileShared.name, testData.fileShared.viewerToolbarPrimary, testData.fileShared.viewerToolbarMore);
- });
-
- it('File shared, favorite - [C326661]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFav.name,
- testData.fileSharedFav.viewerToolbarPrimary,
- testData.fileSharedFav.viewerToolbarMore
- );
- });
-
- it('File shared, locked - [C326662]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedLocked.name,
- testData.fileSharedLocked.viewerToolbarPrimary,
- testData.fileSharedLocked.viewerToolbarMore
- );
- });
-
- it('File shared, favorite, locked - [C326663]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.viewerToolbarPrimary,
- testData.fileSharedFavLocked.viewerToolbarMore
- );
- });
- });
-
- describe('file opened from Search Results', () => {
- beforeAll(async () => {
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkOnlyFiles();
- await searchInput.searchFor(`*${testData.random}`);
- await searchResultsPage.waitForResults();
- });
-
- it('File Office - [C326664]', async () => {
- await testUtil.checkViewerActions(testData.fileDocx.name, testData.fileDocx.viewerToolbarPrimary, testData.fileDocx.viewerToolbarMore);
- });
-
- it('File Office, favorite - [C326665]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxFav.name,
- testData.fileDocxFav.viewerToolbarPrimary,
- testData.fileDocxFav.viewerToolbarMore
- );
- });
-
- it('File simple - [C326666]', async () => {
- await testUtil.checkViewerActions(testData.file.name, testData.file.viewerToolbarPrimary, testData.file.viewerToolbarMore);
- });
-
- it('File favorite - [C326667]', async () => {
- await testUtil.checkViewerActions(testData.fileFav.name, testData.fileFav.viewerToolbarPrimary, testData.fileFav.viewerToolbarMore);
- });
-
- it('File Office, shared - [C326670]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxShared.name,
- testData.fileDocxShared.viewerToolbarPrimary,
- testData.fileDocxShared.viewerToolbarMore
- );
- });
-
- it('File Office, shared, favorite - [C326671]', async () => {
- await testUtil.checkViewerActions(
- testData.fileDocxSharedFav.name,
- testData.fileDocxSharedFav.viewerToolbarPrimary,
- testData.fileDocxSharedFav.viewerToolbarMore
- );
- });
-
- it('File shared - [C326672]', async () => {
- await testUtil.checkViewerActions(testData.fileShared.name, testData.fileShared.viewerToolbarPrimary, testData.fileShared.viewerToolbarMore);
- });
-
- it('File shared, favorite - [C326673]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFav.name,
- testData.fileSharedFav.viewerToolbarPrimary,
- testData.fileSharedFav.viewerToolbarMore
- );
- });
-
- it('File locked - [C326668]', async () => {
- await testUtil.checkViewerActions(testData.fileLocked.name, testData.fileLocked.viewerToolbarPrimary, testData.fileLocked.viewerToolbarMore);
- });
-
- it('File favorite, locked - [C326669]', async () => {
- await testUtil.checkViewerActions(
- testData.fileFavLocked.name,
- testData.fileFavLocked.viewerToolbarPrimary,
- testData.fileFavLocked.viewerToolbarMore
- );
- });
-
- it('File shared, locked - [C326674]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedLocked.name,
- testData.fileSharedLocked.viewerToolbarPrimary,
- testData.fileSharedLocked.viewerToolbarMore
- );
- });
-
- it('File shared, favorite, locked - [C326675]', async () => {
- await testUtil.checkViewerActions(
- testData.fileSharedFavLocked.name,
- testData.fileSharedFavLocked.viewerToolbarPrimary,
- testData.fileSharedFavLocked.viewerToolbarMore
- );
- });
- });
- });
-}
diff --git a/e2e/protractor/suites/actions-available/test-util.ts b/e2e/protractor/suites/actions-available/test-util.ts
deleted file mode 100644
index a31b3f8032..0000000000
--- a/e2e/protractor/suites/actions-available/test-util.ts
+++ /dev/null
@@ -1,145 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { BrowsingPage, Viewer, Utils, Menu } from '@alfresco/aca-testing-shared';
-import { BrowserActions } from '@alfresco/adf-testing';
-
-const page = new BrowsingPage();
-const { dataTable, toolbar } = page;
-const contextMenu = dataTable.menu;
-const viewer = new Viewer();
-const viewerToolbar = viewer.toolbar;
-const menu = new Menu();
-
-export async function checkContextMenu(item: string, expectedContextMenu: string[]): Promise {
- await dataTable.rightClickOnItem(item);
- await contextMenu.waitForMenuToOpen();
-
- const actualActions = await contextMenu.getMenuItems();
- for (const action of expectedContextMenu) {
- expect(actualActions.includes(action)).toBe(true, `Expected to contain ${action}`);
- }
-
- await Utils.pressEscape();
- await menu.waitForMenuToClose();
-}
-
-export async function checkToolbarPrimary(item: string, expectedToolbarPrimary: string[]): Promise {
- await dataTable.selectItem(item);
-
- const actualPrimaryActions = await toolbar.getButtons();
- for (const action of expectedToolbarPrimary) {
- expect(actualPrimaryActions.includes(action)).toBe(true, `Expected to contain ${action}`);
- }
-}
-
-export async function checkToolbarActions(item: string, expectedToolbarPrimary: string[], expectedToolbarMore: string[]): Promise {
- await dataTable.selectItem(item);
-
- const actualPrimaryActions = await toolbar.getButtons();
- for (const action of expectedToolbarPrimary) {
- expect(actualPrimaryActions.includes(action)).toBe(true, `Expected to contain ${action}`);
- }
-
- await toolbar.openMoreMenu();
-
- const actualMoreActions = await toolbar.menu.getMenuItems();
- for (const action of expectedToolbarMore) {
- expect(actualMoreActions.includes(action)).toBe(true, `Expected to contain ${action}`);
- }
-
- await toolbar.closeMoreMenu();
-}
-
-export async function checkMultipleSelContextMenu(items: string[], expectedContextMenu: string[]): Promise {
- await dataTable.selectMultipleItems(items);
- await dataTable.rightClickOnMultipleSelection();
- await contextMenu.waitForMenuToOpen();
-
- const actualActions = await contextMenu.getMenuItems();
- for (const action of expectedContextMenu) {
- expect(actualActions.includes(action)).toBe(true, `Expected to contain ${action}`);
- }
-
- await Utils.pressEscape();
- await menu.waitForMenuToClose();
-}
-
-export async function checkMultipleSelToolbarPrimary(items: string[], expectedToolbarPrimary: string[]): Promise {
- await dataTable.selectMultipleItems(items);
-
- const actualPrimaryActions = await toolbar.getButtons();
- for (const action of expectedToolbarPrimary) {
- expect(actualPrimaryActions.includes(action)).toBe(true, `Expected to contain ${action}`);
- }
-}
-
-export async function checkMultipleSelToolbarActions(
- items: string[],
- expectedToolbarPrimary: string[],
- expectedToolbarMore: string[]
-): Promise {
- await dataTable.selectMultipleItems(items);
-
- const actualPrimaryActions = await toolbar.getButtons();
- for (const action of expectedToolbarPrimary) {
- expect(actualPrimaryActions.includes(action)).toBe(true, `Expected to contain ${action}`);
- }
-
- await toolbar.openMoreMenu();
-
- const actualMoreActions = await toolbar.menu.getMenuItems();
- for (const action of expectedToolbarMore) {
- expect(actualMoreActions.includes(action)).toBe(true, `Expected to contain ${action}`);
- }
-
- await toolbar.closeMoreMenu();
-}
-
-export async function checkViewerActions(item: string, expectedToolbarPrimary: string[], expectedToolbarMore: string[]): Promise {
- await dataTable.selectItem(item);
- await BrowserActions.click(toolbar.viewButton);
- await viewer.waitForViewerToOpen();
-
- let actualPrimaryActions = await viewerToolbar.getButtons();
- actualPrimaryActions = removeClosePreviousNextOldInfo(actualPrimaryActions);
-
- for (const action of expectedToolbarPrimary) {
- expect(actualPrimaryActions.includes(action)).toBe(true, `Expected to contain ${action}`);
- }
-
- await viewerToolbar.openMoreMenu();
-
- const actualMoreActions = await viewerToolbar.menu.getMenuItems();
- for (const action of expectedToolbarMore) {
- expect(actualMoreActions.includes(action)).toBe(true, `Expected to contain ${action}`);
- }
-
- await Utils.pressEscape();
- await menu.waitForMenuToClose();
-}
-
-const toRemove = ['Close', 'Previous File', 'Next File', 'View details'];
-
-const removeClosePreviousNextOldInfo = (actions: string[]): string[] => actions.filter((elem) => !toRemove.includes(elem));
diff --git a/e2e/protractor/suites/actions/library/library-actions.test.ts b/e2e/protractor/suites/actions/library/library-actions.test.ts
deleted file mode 100755
index 588b18afaa..0000000000
--- a/e2e/protractor/suites/actions/library/library-actions.test.ts
+++ /dev/null
@@ -1,429 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { AdminActions, SITE_VISIBILITY, SITE_ROLES, LoginPage, BrowsingPage, Utils, ConfirmDialog, RepoClient } from '@alfresco/aca-testing-shared';
-import { BrowserActions } from '@alfresco/adf-testing';
-
-describe('Library actions', () => {
- const username = `user-${Utils.random()}`;
-
- const sitePublic1Admin = `admin-public1-${Utils.random()}`;
- const sitePublic2Admin = `admin-public2-${Utils.random()}`;
- const sitePublic3Admin = `admin-public3-${Utils.random()}`;
- const sitePublic4Admin = `admin-public4-${Utils.random()}`;
- const sitePublic5Admin = `admin-public5-${Utils.random()}`;
- const sitePublic6Admin = `admin-public6-${Utils.random()}`;
- const sitePublic7Admin = `admin-public7-${Utils.random()}`;
- const sitePublic8Admin = `admin-public8-${Utils.random()}`;
-
- const sitePublicUser = `user-public1-${Utils.random()}`;
- const siteForDelete1 = `user-public2-${Utils.random()}`;
- const siteForDelete2 = `user-public3-${Utils.random()}`;
-
- const siteModerated1Admin = `admin-moderated1-${Utils.random()}`;
- const siteModerated2Admin = `admin-moderated2-${Utils.random()}`;
-
- const siteSearchModerated1Admin = `site-moderated-search-1-${Utils.random()}`;
- const siteSearchModerated2Admin = `site-moderated-search-2-${Utils.random()}`;
-
- const siteSearchPublic1Admin = `site-public-search-1-${Utils.random()}`;
- const siteSearchPublic2Admin = `site-public-search-2-${Utils.random()}`;
- const siteSearchPublic3Admin = `site-public-search-3-${Utils.random()}`;
- const siteSearchPublic4Admin = `site-public-search-4-${Utils.random()}`;
- const siteSearchForDelete = `site-public-search-5-${Utils.random()}`;
-
- const apis = {
- user: new RepoClient(username, username)
- };
-
- const loginPage = new LoginPage();
- const page = new BrowsingPage();
- const { dataTable, toolbar } = page;
- const { searchInput } = page.pageLayoutHeader;
-
- const confirmDialog = new ConfirmDialog();
- const adminApiActions = new AdminActions();
-
- const publicAdminSites = [siteSearchPublic1Admin, siteSearchPublic2Admin, siteSearchPublic3Admin, siteSearchPublic4Admin];
- const moderatedSites = [siteSearchModerated1Admin, siteSearchModerated2Admin];
-
- beforeAll(async () => {
- await adminApiActions.createUser({ username });
-
- await adminApiActions.sites.createSites(publicAdminSites);
- await adminApiActions.sites.createSites(moderatedSites, SITE_VISIBILITY.MODERATED);
-
- await loginPage.loginWith(username);
- });
-
- beforeEach(async () => {
- await Utils.pressEscape();
- });
-
- afterEach(async () => {
- await Utils.pressEscape();
- await page.header.expandSideNav();
- await page.clickPersonalFiles();
- });
-
- afterAll(async () => {
- await adminApiActions.login();
- await adminApiActions.deleteSites([...publicAdminSites, ...moderatedSites]);
- });
-
- describe('Join a public library', () => {
- beforeAll(async () => {
- await adminApiActions.sites.createSite(sitePublic1Admin);
- await apis.user.favorites.addFavoriteById('site', sitePublic1Admin);
- });
-
- afterAll(async () => {
- await adminApiActions.sites.deleteSite(sitePublic1Admin);
- });
-
- it('[C290105] from Favorite Libraries', async () => {
- await page.goToFavoriteLibrariesAndWait();
- await dataTable.selectItem(sitePublic1Admin);
- await BrowserActions.click(toolbar.joinButton);
-
- expect(await dataTable.getLibraryRole(sitePublic1Admin)).toEqual(SITE_ROLES.SITE_CONSUMER.LABEL);
- });
-
- it('[C306959] from Search Results', async () => {
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkLibraries();
- await searchInput.searchForLibrary(siteSearchPublic1Admin);
- await dataTable.waitForBody();
- await dataTable.selectItem(siteSearchPublic1Admin);
- await BrowserActions.click(toolbar.joinButton);
-
- expect(await dataTable.getLibraryRole(siteSearchPublic1Admin)).toEqual(SITE_ROLES.SITE_CONSUMER.LABEL);
- });
- });
-
- describe('Join a moderated library', () => {
- beforeAll(async () => {
- await adminApiActions.sites.createSite(siteModerated1Admin, SITE_VISIBILITY.MODERATED);
- await apis.user.favorites.addFavoriteById('site', siteModerated1Admin);
- await apis.user.queries.waitForSites(siteSearchModerated1Admin, { expect: 1 });
- });
-
- afterAll(async () => {
- await adminApiActions.sites.deleteSite(siteModerated1Admin);
- });
-
- it('[C290109] from Favorite Libraries', async () => {
- await page.goToFavoriteLibrariesAndWait();
- await dataTable.selectItem(siteModerated1Admin);
- await BrowserActions.click(toolbar.joinButton);
-
- expect(await dataTable.getLibraryRole(siteModerated1Admin)).toEqual(SITE_ROLES.NONE.LABEL);
- const hasJoinRequest = await apis.user.sites.hasMembershipRequest(siteModerated1Admin);
- expect(hasJoinRequest).toBe(true, `Join request does not exist on ${siteModerated1Admin}`);
- });
-
- it('[C306960] from Search Results', async () => {
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkLibraries();
- await searchInput.searchForLibrary(siteSearchModerated1Admin);
- await dataTable.waitForBody();
- await dataTable.selectItem(siteSearchModerated1Admin);
- await BrowserActions.click(toolbar.joinButton);
-
- expect(await dataTable.getLibraryRole(siteSearchModerated1Admin)).toEqual(SITE_ROLES.NONE.LABEL);
- const hasJoinRequest = await apis.user.sites.hasMembershipRequest(siteSearchModerated1Admin);
- expect(hasJoinRequest).toBe(true, `Join request does not exist on ${siteSearchModerated1Admin}`);
- });
- });
-
- describe('Leave a library', () => {
- const adminSites = [sitePublic2Admin, sitePublic3Admin, sitePublic4Admin, sitePublic5Admin];
- const userSites = [sitePublicUser];
-
- beforeAll(async () => {
- await adminApiActions.sites.createSites(adminSites);
- await apis.user.sites.createSites(userSites);
-
- await apis.user.favorites.addFavoriteById('site', sitePublic3Admin);
- await adminApiActions.sites.addSiteMember(sitePublic2Admin, username, SITE_ROLES.SITE_COLLABORATOR.ROLE);
- await adminApiActions.sites.addSiteMember(sitePublic3Admin, username, SITE_ROLES.SITE_MANAGER.ROLE);
- await adminApiActions.sites.addSiteMember(siteSearchPublic2Admin, username, SITE_ROLES.SITE_CONTRIBUTOR.ROLE);
- await adminApiActions.sites.addSiteMember(sitePublic4Admin, username, SITE_ROLES.SITE_MANAGER.ROLE);
- await adminApiActions.sites.addSiteMember(sitePublic5Admin, username, SITE_ROLES.SITE_MANAGER.ROLE);
- await apis.user.queries.waitForSites(siteSearchPublic2Admin, { expect: 1 });
- });
-
- afterAll(async () => {
- await adminApiActions.deleteSites(adminSites);
- await apis.user.sites.deleteSites(userSites);
- });
-
- it('[C290106] from My Libraries', async () => {
- await page.goToMyLibrariesAndWait();
- await dataTable.selectItem(sitePublic2Admin);
- await BrowserActions.click(toolbar.leaveButton);
- await page.waitForDialog();
- await BrowserActions.click(confirmDialog.okButton);
-
- expect(await page.getSnackBarMessage()).toEqual(`You have left the library`);
- expect(await dataTable.isItemPresent(sitePublic2Admin)).toBe(false, `${sitePublic2Admin} is displayed`);
- });
-
- it('[C290110] from Favorite Libraries', async () => {
- await page.goToFavoriteLibrariesAndWait();
- await dataTable.selectItem(sitePublic3Admin);
- await BrowserActions.click(toolbar.leaveButton);
- await page.waitForDialog();
- await BrowserActions.click(confirmDialog.okButton);
-
- expect(await page.getSnackBarMessage()).toEqual(`You have left the library`);
- expect(await dataTable.isItemPresent(sitePublic3Admin)).toBe(true, `${sitePublic3Admin} is not displayed`);
- });
-
- it('[C306961] from Search Results', async () => {
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkLibraries();
- await searchInput.searchForLibrary(siteSearchPublic2Admin);
- await dataTable.waitForBody();
-
- await dataTable.selectItem(siteSearchPublic2Admin);
- await BrowserActions.click(toolbar.leaveButton);
- await page.waitForDialog();
- await BrowserActions.click(confirmDialog.okButton);
-
- expect(await page.getSnackBarMessage()).toEqual(`You have left the library`);
- expect(await dataTable.isItemPresent(siteSearchPublic2Admin)).toBe(true, `${siteSearchPublic2Admin} is not displayed`);
- });
-
- it('[C290136] Confirmation dialog UI', async () => {
- await page.goToMyLibrariesAndWait();
- await dataTable.selectItem(sitePublic4Admin);
- await BrowserActions.click(toolbar.leaveButton);
- await page.waitForDialog();
-
- expect(await confirmDialog.isDialogOpen()).toBe(true, 'Confirm delete dialog not open');
- expect(await confirmDialog.getDialogTitle()).toContain('Leave this library?');
- expect(await confirmDialog.getText()).toContain('Leaving will remove your access.');
- expect(await confirmDialog.isOkEnabled()).toBe(true, 'OK button is not enabled');
- expect(await confirmDialog.isCancelEnabled()).toBe(true, 'Cancel button is not enabled');
- });
-
- it('[C290111] Cancel Leave Library', async () => {
- await page.goToMyLibrariesAndWait();
- await dataTable.selectItem(sitePublic5Admin);
- await BrowserActions.click(toolbar.leaveButton);
- await page.waitForDialog();
-
- expect(await confirmDialog.isCancelEnabled()).toBe(true, 'Cancel button is not enabled');
- await BrowserActions.click(confirmDialog.cancelButton);
-
- expect(await dataTable.isItemPresent(sitePublic5Admin)).toBe(true, `${sitePublic5Admin} was deleted`);
- });
-
- it('[C290107] Leave a library - failure notification', async () => {
- await page.goToMyLibrariesAndWait();
- await dataTable.selectItem(sitePublicUser);
- await BrowserActions.click(toolbar.leaveButton);
- await page.waitForDialog();
- await BrowserActions.click(confirmDialog.okButton);
-
- expect(await page.getSnackBarMessage()).toEqual(`Cannot leave this library`);
- });
- });
-
- describe('Cancel join', () => {
- beforeAll(async () => {
- await adminApiActions.sites.createSite(siteModerated2Admin, SITE_VISIBILITY.MODERATED);
- await apis.user.favorites.addFavoriteById('site', siteModerated2Admin);
- await apis.user.sites.requestToJoin(siteModerated2Admin);
- await apis.user.sites.requestToJoin(siteSearchModerated2Admin);
- await apis.user.queries.waitForSites(siteSearchModerated2Admin, { expect: 1 });
- });
-
- afterAll(async () => {
- await adminApiActions.sites.deleteSite(siteModerated2Admin);
- });
-
- it('[C290108] from Favorite Libraries', async () => {
- await page.goToFavoriteLibrariesAndWait();
- await dataTable.selectItem(siteModerated2Admin);
- await toolbar.clickButton('Cancel Join Request');
-
- expect(await page.getSnackBarMessage()).toEqual(`Canceled the request to join the library`);
-
- const hasJoinRequest = await apis.user.sites.hasMembershipRequest(siteModerated2Admin);
- expect(hasJoinRequest).toBe(false, `Join request exists on ${siteModerated2Admin}`);
- });
-
- it('[C306962] from Search Results', async () => {
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkLibraries();
- await searchInput.searchForLibrary(siteSearchModerated2Admin);
- await dataTable.waitForBody();
-
- await dataTable.selectItem(siteSearchModerated2Admin);
- await toolbar.clickButton('Cancel Join Request');
-
- expect(await page.getSnackBarMessage()).toEqual(`Canceled the request to join the library`);
-
- const hasJoinRequest = await apis.user.sites.hasMembershipRequest(siteSearchModerated2Admin);
- expect(hasJoinRequest).toBe(false, `Join request exists on ${siteSearchModerated2Admin}`);
- });
- });
-
- describe('Mark library as favorite', () => {
- beforeAll(async () => {
- await adminApiActions.sites.createSite(sitePublic6Admin);
- await adminApiActions.sites.addSiteMember(sitePublic6Admin, username, SITE_ROLES.SITE_MANAGER.ROLE);
- await apis.user.queries.waitForSites(siteSearchPublic3Admin, { expect: 1 });
- });
-
- afterAll(async () => {
- await adminApiActions.sites.deleteSite(sitePublic6Admin);
- });
-
- it('[C289974] from My Libraries', async () => {
- await page.goToMyLibrariesAndWait();
- await dataTable.selectItem(sitePublic6Admin);
- await toolbar.clickMoreActionsFavorite();
-
- expect(await apis.user.favorites.isFavoriteWithRetry(sitePublic6Admin, { expect: true })).toBe(true, `${sitePublic6Admin} not favorite`);
- });
-
- it('[C306963] from Search Results', async () => {
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkLibraries();
- await searchInput.searchForLibrary(siteSearchPublic3Admin);
- await dataTable.waitForBody();
-
- await dataTable.selectItem(siteSearchPublic3Admin);
- await toolbar.clickMoreActionsFavorite();
-
- expect(await apis.user.favorites.isFavoriteWithRetry(siteSearchPublic3Admin, { expect: true })).toBe(
- true,
- `${siteSearchPublic3Admin} not favorite`
- );
- });
- });
-
- describe('Remove library from favorites', () => {
- const adminSites = [sitePublic7Admin, sitePublic8Admin];
-
- beforeAll(async () => {
- await adminApiActions.sites.createSites(adminSites);
-
- await apis.user.favorites.addFavoriteById('site', sitePublic7Admin);
- await apis.user.favorites.addFavoriteById('site', sitePublic8Admin);
-
- await apis.user.favorites.addFavoriteById('site', siteSearchPublic4Admin);
- await adminApiActions.sites.addSiteMember(sitePublic7Admin, username, SITE_ROLES.SITE_MANAGER.ROLE);
- await adminApiActions.sites.addSiteMember(sitePublic8Admin, username, SITE_ROLES.SITE_MANAGER.ROLE);
- await adminApiActions.sites.addSiteMember(siteSearchPublic4Admin, username, SITE_ROLES.SITE_MANAGER.ROLE);
- await apis.user.queries.waitForSites(siteSearchPublic4Admin, { expect: 1 });
- });
-
- afterAll(async () => {
- await adminApiActions.sites.deleteSites(adminSites);
- });
-
- it('[C289975] from My Libraries', async () => {
- await page.goToMyLibrariesAndWait();
- await dataTable.selectItem(sitePublic7Admin);
- await toolbar.clickMoreActionsRemoveFavorite();
-
- expect(await apis.user.favorites.isFavoriteWithRetry(sitePublic7Admin, { expect: false })).toBe(false, `${sitePublic7Admin} still favorite`);
- });
-
- it('[C289976] from Favorite Libraries', async () => {
- await page.goToFavoriteLibrariesAndWait();
- await dataTable.selectItem(sitePublic8Admin);
- await toolbar.clickMoreActionsRemoveFavorite();
-
- expect(await dataTable.isItemPresent(sitePublic8Admin)).toBe(false, `${sitePublic8Admin} is displayed`);
- expect(await apis.user.favorites.isFavoriteWithRetry(sitePublic8Admin, { expect: false })).toBe(false, `${sitePublic8Admin} still favorite`);
- });
-
- it('[C306964] from Search Results', async () => {
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkLibraries();
- await searchInput.searchForLibrary(siteSearchPublic4Admin);
- await dataTable.waitForBody();
-
- await dataTable.selectItem(siteSearchPublic4Admin);
- await toolbar.clickMoreActionsRemoveFavorite();
-
- expect(await apis.user.favorites.isFavoriteWithRetry(siteSearchPublic4Admin, { expect: false })).toBe(
- false,
- `${siteSearchPublic4Admin} still favorite`
- );
- });
- });
-
- describe('Delete a library', () => {
- const userSites = [siteForDelete1, siteForDelete2, siteSearchForDelete];
-
- beforeAll(async () => {
- await apis.user.sites.createSites(userSites);
- await apis.user.queries.waitForSites(siteSearchForDelete, { expect: 1 });
- });
-
- it('[C289988] from My Libraries', async () => {
- await page.goToMyLibrariesAndWait();
- await dataTable.selectItem(siteForDelete1);
- await toolbar.clickMoreActionsDelete();
-
- expect(await page.getSnackBarMessage()).toEqual(`Library deleted`);
- expect(await dataTable.isItemPresent(siteForDelete1)).toBe(false, `${siteForDelete1} still displayed`);
- });
-
- it('[C289991] from Favorite Libraries', async () => {
- await page.goToFavoriteLibrariesAndWait();
- await dataTable.selectItem(siteForDelete2);
- await toolbar.clickMoreActionsDelete();
-
- expect(await page.getSnackBarMessage()).toEqual(`Library deleted`);
- expect(await dataTable.isItemPresent(siteForDelete2)).toBe(false, `${siteForDelete2} still displayed`);
- });
-
- it('[C306965] from Search Results', async () => {
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkLibraries();
- await searchInput.searchForLibrary(siteSearchForDelete);
- await dataTable.waitForBody();
-
- await dataTable.selectItem(siteSearchForDelete);
- await toolbar.clickMoreActionsDelete();
-
- expect(await page.getSnackBarMessage()).toEqual(`Library deleted`);
- expect(await dataTable.isItemPresent(siteSearchForDelete)).toBe(false, `${siteSearchForDelete} still displayed`);
- });
- });
-});
diff --git a/e2e/protractor/suites/navigation/single-click.test.ts b/e2e/protractor/suites/navigation/single-click.test.ts
deleted file mode 100755
index a91b82fbd8..0000000000
--- a/e2e/protractor/suites/navigation/single-click.test.ts
+++ /dev/null
@@ -1,154 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { AdminActions, UserActions, LoginPage, BrowsingPage, Viewer, RepoClient, Utils } from '@alfresco/aca-testing-shared';
-
-describe('Single click on item name', () => {
- const username = `user-${Utils.random()}`;
-
- const file1 = `file1-${Utils.random()}.txt`;
- let file1Id: string;
- const folder1 = `folder1-${Utils.random()}`;
- let folder1Id: string;
-
- const deletedFile1 = `file1-${Utils.random()}.txt`;
- let deletedFile1Id: string;
- const deletedFolder1 = `folder1-${Utils.random()}`;
- let deletedFolder1Id: string;
-
- const siteName = `site-${Utils.random()}`;
- const fileSite = `fileSite-${Utils.random()}.txt`;
-
- const apis = {
- user: new RepoClient(username, username)
- };
-
- const loginPage = new LoginPage();
- const page = new BrowsingPage();
- const { dataTable, breadcrumb, toolbar } = page;
- const viewer = new Viewer();
- const { searchInput } = page.pageLayoutHeader;
-
- const adminApiActions = new AdminActions();
- const userActions = new UserActions();
-
- beforeAll(async () => {
- await adminApiActions.createUser({ username });
-
- const initialRecentTotalItems = await apis.user.search.getTotalItems(username);
-
- file1Id = (await apis.user.nodes.createFile(file1)).entry.id;
- folder1Id = (await apis.user.nodes.createFolder(folder1)).entry.id;
-
- await apis.user.sites.createSite(siteName);
- const docLibId = await apis.user.sites.getDocLibId(siteName);
- await apis.user.nodes.createFile(fileSite, docLibId);
-
- await apis.user.search.waitForApi(username, { expect: initialRecentTotalItems + 2 });
-
- deletedFile1Id = (await apis.user.nodes.createFile(deletedFile1)).entry.id;
- deletedFolder1Id = (await apis.user.nodes.createFolder(deletedFolder1)).entry.id;
-
- await userActions.login(username, username);
- await userActions.deleteNodes([deletedFile1Id, deletedFolder1Id], false);
-
- await loginPage.loginWith(username);
- });
-
- afterAll(async () => {
- await userActions.login(username, username);
- await userActions.deleteSites([siteName]);
- await userActions.deleteNodes([folder1Id, file1Id]);
- await userActions.emptyTrashcan();
- });
-
- describe('on Favorites', () => {
- beforeAll(async () => {
- const initialFavoriteTotalItems = await apis.user.favorites.getFavoritesTotalItems();
- await apis.user.favorites.addFavoriteById('file', file1Id);
- await apis.user.favorites.addFavoriteById('folder', folder1Id);
- await apis.user.favorites.waitForApi({ expect: initialFavoriteTotalItems + 2 });
- });
-
- beforeEach(async () => {
- await page.clickFavoritesAndWait();
- });
-
- it('[C284909] Hyperlink appears when mouse over a file/folder', async () => {
- expect(await dataTable.hasLinkOnName(file1)).toBe(true, 'Link on name is missing');
- });
-
- it('[C284910] File preview opens when clicking the hyperlink', async () => {
- await dataTable.clickNameLink(file1);
-
- expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
-
- await Utils.pressEscape();
- });
-
- it('[C284911] Navigate inside the folder when clicking the hyperlink', async () => {
- await dataTable.clickNameLink(folder1);
-
- expect(await breadcrumb.currentItem.getText()).toBe(folder1);
- });
- });
-
- describe('on Search Results', () => {
- beforeEach(async () => {
- await toolbar.clickSearchIconButton();
- await searchInput.clickSearchButton();
- await searchInput.checkFilesAndFolders();
- });
-
- afterEach(async () => {
- await Utils.pressEscape();
- await page.clickPersonalFilesAndWait();
- });
-
- it('[C306988] Hyperlink appears when mouse over a file', async () => {
- await searchInput.searchFor(file1);
- await dataTable.waitForBody();
-
- expect(await dataTable.hasLinkOnSearchResultName(file1)).toBe(true, 'Link on name is missing');
- });
-
- it('[C306989] File preview opens when clicking the hyperlink', async () => {
- await searchInput.searchFor(file1);
- await dataTable.waitForBody();
- await dataTable.clickSearchResultNameLink(file1);
-
- expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
-
- await Utils.pressEscape();
- });
-
- it('[C306990] Navigate inside the folder when clicking the hyperlink', async () => {
- await searchInput.searchFor(folder1);
- await dataTable.waitForBody();
- await dataTable.clickSearchResultNameLink(folder1);
-
- expect(await breadcrumb.currentItem.getText()).toBe(folder1);
- });
- });
-});
diff --git a/e2e/protractor/suites/pagination/favorites.ts b/e2e/protractor/suites/pagination/favorites.ts
deleted file mode 100755
index 316fec04b0..0000000000
--- a/e2e/protractor/suites/pagination/favorites.ts
+++ /dev/null
@@ -1,127 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { BrowsingPage, LoginPage, Utils } from '@alfresco/aca-testing-shared';
-
-export function favoritesTests(username: string) {
- const page = new BrowsingPage();
- const loginPage = new LoginPage();
- const { dataTable, pagination } = page;
-
- describe('Pagination controls : ', () => {
- beforeAll(async () => {
- await loginPage.loginWith(username);
- await page.clickFavoritesAndWait();
- });
-
- afterEach(async () => {
- await Utils.pressEscape();
- });
-
- it('[C280113] Pagination control default values', async () => {
- expect(await pagination.getRange()).toContain('1-25 of 51');
- expect(await pagination.getMaxItems()).toContain('25');
- expect(await pagination.getCurrentPage()).toContain('Page 1');
- expect(await pagination.getTotalPages()).toContain('of 3');
- expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled');
- expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
- });
-
- it('[C280114] Items per page values', async () => {
- await pagination.openMaxItemsMenu();
- expect(await pagination.menu.getNthItem(1).getText()).toBe('25');
- expect(await pagination.menu.getNthItem(2).getText()).toBe('50');
- expect(await pagination.menu.getNthItem(3).getText()).toBe('100');
- await pagination.menu.closeMenu();
- });
-
- it('[C280115] current page menu items', async () => {
- await pagination.openMaxItemsMenu();
- await pagination.menu.clickMenuItem('25');
- expect(await pagination.getMaxItems()).toContain('25');
- expect(await pagination.getTotalPages()).toContain('of 3');
- await pagination.openCurrentPageMenu();
- expect(await pagination.menu.getItemsCount()).toBe(3);
- await pagination.menu.closeMenu();
-
- await pagination.openMaxItemsMenu();
- await pagination.menu.clickMenuItem('50');
- expect(await pagination.getMaxItems()).toContain('50');
- expect(await pagination.getTotalPages()).toContain('of 2');
- await pagination.openCurrentPageMenu();
- expect(await pagination.menu.getItemsCount()).toBe(2);
- await pagination.menu.closeMenu();
-
- await pagination.openMaxItemsMenu();
- await pagination.menu.clickMenuItem('100');
- expect(await pagination.getMaxItems()).toContain('100');
- expect(await pagination.getTotalPages()).toContain('of 1');
-
- await pagination.resetToDefaultPageSize();
- });
-
- it('[C280116] change the current page from menu', async () => {
- await pagination.openCurrentPageMenu();
- await pagination.menu.clickNthItem(3);
- expect(await pagination.getRange()).toContain('51-51 of 51');
- expect(await pagination.getCurrentPage()).toContain('Page 3');
- expect(await pagination.isPreviousEnabled()).toBe(true, 'Previous button is not enabled');
- expect(await pagination.isNextEnabled()).toBe(false, 'Next button is enabled');
- expect(await dataTable.isItemPresent('my-file-1')).toBe(true, 'File not found on page');
-
- await pagination.resetToDefaultPageNumber();
- });
-
- it('[C280119] navigate to next and previous pages', async () => {
- await pagination.clickNext();
- await dataTable.waitForHeader();
- expect(await pagination.getRange()).toContain('26-50 of 51');
- expect(await dataTable.isItemPresent('my-file-21')).toBe(true, 'File not found on page');
- await pagination.resetToDefaultPageNumber();
-
- await pagination.openCurrentPageMenu();
- await pagination.menu.clickNthItem(2);
- await dataTable.waitForHeader();
- await pagination.clickPrevious();
- await dataTable.waitForHeader();
- expect(await pagination.getRange()).toContain('1-25 of 51');
- expect(await dataTable.isItemPresent('my-file-50')).toBe(true, 'File not found on page');
-
- await pagination.resetToDefaultPageNumber();
- });
-
- it('[C280117] Previous button is disabled on first page', async () => {
- expect(await pagination.getCurrentPage()).toContain('Page 1');
- expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled on first page');
- });
-
- it('[C280118] Next button is disabled on last page', async () => {
- await pagination.openCurrentPageMenu();
- await pagination.menu.clickNthItem(3);
- expect(await dataTable.getRowsCount()).toBe(1, 'Incorrect number of items on the last page');
- expect(await pagination.getCurrentPage()).toContain('Page 3');
- expect(await pagination.isNextEnabled()).toBe(false, 'Next button is enabled on last page');
- });
- });
-}
diff --git a/e2e/protractor/suites/pagination/multiple-pages-files.test.ts b/e2e/protractor/suites/pagination/multiple-pages-files.test.ts
index 82e2a8afca..2aee39be8c 100644
--- a/e2e/protractor/suites/pagination/multiple-pages-files.test.ts
+++ b/e2e/protractor/suites/pagination/multiple-pages-files.test.ts
@@ -23,11 +23,9 @@
*/
import { Utils, AdminActions, RepoClient } from '@alfresco/aca-testing-shared';
-import { personalFilesTests } from './personal-files';
import { recentFilesTests } from './recent-files';
import { searchResultsTests } from './search-results';
import { sharedFilesTests } from './shared-files';
-import { favoritesTests } from './favorites';
describe('Pagination on multiple pages : ', () => {
const random = Utils.random();
@@ -44,7 +42,6 @@ describe('Pagination on multiple pages : ', () => {
const userApi = new RepoClient(username, username);
const adminApiActions = new AdminActions();
- let initialFavoritesTotalItems: number;
let initialSearchTotalItems: number;
beforeAll(async () => {
@@ -55,7 +52,6 @@ describe('Pagination on multiple pages : ', () => {
parentId = (await userApi.nodes.createFolder(parent)).entry.id;
filesIds = (await userApi.nodes.createFiles(files, parent)).list.entries.map((entries: any) => entries.entry.id);
- initialFavoritesTotalItems = await userApi.favorites.getFavoritesTotalItems();
await userApi.shared.shareFilesByIds(filesIds);
await userApi.favorites.addFavoritesByIds('file', filesIds);
});
@@ -64,10 +60,6 @@ describe('Pagination on multiple pages : ', () => {
await userApi.nodes.deleteNodeById(parentId);
});
- describe('on Personal Files', () => {
- personalFilesTests(username, parent);
- });
-
describe('on Recent Files', () => {
beforeAll(async () => {
await userApi.search.waitForApi(username, { expect: initialSearchTotalItems + 51 });
@@ -88,11 +80,4 @@ describe('Pagination on multiple pages : ', () => {
});
sharedFilesTests(username);
});
-
- describe('on Favorites', () => {
- beforeAll(async () => {
- await userApi.favorites.waitForApi({ expect: initialFavoritesTotalItems + 51 });
- });
- favoritesTests(username);
- });
});
diff --git a/e2e/protractor/suites/pagination/personal-files.ts b/e2e/protractor/suites/pagination/personal-files.ts
deleted file mode 100755
index 078d451a53..0000000000
--- a/e2e/protractor/suites/pagination/personal-files.ts
+++ /dev/null
@@ -1,130 +0,0 @@
-/*!
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * 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:
- *
- * The Alfresco Example Content Application 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.
- *
- * The Alfresco Example Content Application 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
- * from Hyland Software. If not, see .
- */
-
-import { BrowsingPage, LoginPage, Utils } from '@alfresco/aca-testing-shared';
-
-export function personalFilesTests(username: string, parentName: string) {
- const page = new BrowsingPage();
- const loginPage = new LoginPage();
- const { dataTable, pagination } = page;
-
- describe('Pagination controls : ', () => {
- beforeAll(async () => {
- await loginPage.loginWith(username);
- await page.clickPersonalFilesAndWait();
- await dataTable.doubleClickOnRowByName(parentName);
- await dataTable.waitForHeader();
- });
-
- afterEach(async () => {
- await Utils.pressEscape();
- });
-
- it('[C280077] Pagination control default values', async () => {
- expect(await pagination.getRange()).toContain('1-25 of 51');
- expect(await pagination.getMaxItems()).toContain('25');
- expect(await pagination.getCurrentPage()).toContain('Page 1');
- expect(await pagination.getTotalPages()).toContain('of 3');
- expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled');
- expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
- });
-
- it('[C280078] Items per page values', async () => {
- await pagination.openMaxItemsMenu();
- expect(await pagination.menu.getNthItem(1).getText()).toBe('25');
- expect(await pagination.menu.getNthItem(2).getText()).toBe('50');
- expect(await pagination.menu.getNthItem(3).getText()).toBe('100');
- await pagination.menu.closeMenu();
- });
-
- it('[C280079] current page menu items', async () => {
- await pagination.openMaxItemsMenu();
- await pagination.menu.clickMenuItem('25');
- expect(await pagination.getMaxItems()).toContain('25');
- expect(await pagination.getTotalPages()).toContain('of 3');
- await pagination.openCurrentPageMenu();
- expect(await pagination.menu.getItemsCount()).toBe(3);
- await pagination.menu.closeMenu();
-
- await pagination.openMaxItemsMenu();
- await pagination.menu.clickMenuItem('50');
- expect(await pagination.getMaxItems()).toContain('50');
- expect(await pagination.getTotalPages()).toContain('of 2');
- await pagination.openCurrentPageMenu();
- expect(await pagination.menu.getItemsCount()).toBe(2);
- await pagination.menu.closeMenu();
-
- await pagination.openMaxItemsMenu();
- await pagination.menu.clickMenuItem('100');
- expect(await pagination.getMaxItems()).toContain('100');
- expect(await pagination.getTotalPages()).toContain('of 1');
-
- await pagination.resetToDefaultPageSize();
- });
-
- it('[C280080] change the current page from menu', async () => {
- await pagination.openCurrentPageMenu();
- await pagination.menu.clickNthItem(3);
- await dataTable.waitForHeader();
- expect(await pagination.getRange()).toContain('51-51 of 51');
- expect(await pagination.getCurrentPage()).toContain('Page 3');
- expect(await pagination.isPreviousEnabled()).toBe(true, 'Previous button is not enabled');
- expect(await pagination.isNextEnabled()).toBe(false, 'Next button is enabled');
- expect(await dataTable.isItemPresent('my-file-9')).toBe(true, 'File not found on page');
-
- await pagination.resetToDefaultPageNumber();
- });
-
- it('[C280083] navigate to next and previous pages', async () => {
- await pagination.clickNext();
- await dataTable.waitForHeader();
- expect(await pagination.getRange()).toContain('26-50 of 51');
- expect(await dataTable.isItemPresent('my-file-34')).toBe(true, 'my-file-34 not found on page');
- await pagination.resetToDefaultPageNumber();
-
- await pagination.openCurrentPageMenu();
- await pagination.menu.clickNthItem(2);
- await dataTable.waitForHeader();
- await pagination.clickPrevious();
- await dataTable.waitForHeader();
- expect(await pagination.getRange()).toContain('1-25 of 51');
- expect(await dataTable.isItemPresent('my-file-15')).toBe(true, 'my-file-15 not found on page');
-
- await pagination.resetToDefaultPageNumber();
- });
-
- it('[C280081] Previous button is disabled on first page', async () => {
- expect(await pagination.getCurrentPage()).toContain('Page 1');
- expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled on first page');
- });
-
- it('[C280082] Next button is disabled on last page', async () => {
- await pagination.openCurrentPageMenu();
- await pagination.menu.clickNthItem(3);
- expect(await dataTable.getRowsCount()).toBe(1, 'Incorrect number of items on the last page');
- expect(await pagination.getCurrentPage()).toContain('Page 3');
- expect(await pagination.isNextEnabled()).toBe(false, 'Next button is enabled on last page');
- });
- });
-}
diff --git a/package-lock.json b/package-lock.json
index 2667d2678e..6786802be5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,11 +10,11 @@
"hasInstallScript": true,
"license": "LGPL-3.0",
"dependencies": {
- "@alfresco/adf-content-services": ">=6.6.0-6904949573",
- "@alfresco/adf-core": ">=6.6.0-6904949573",
- "@alfresco/adf-extensions": ">=6.6.0-6904949573",
- "@alfresco/eslint-plugin-eslint-angular": ">=6.6.0-6904949573",
- "@alfresco/js-api": "7.2.0",
+ "@alfresco/adf-content-services": "6.6.0-7045741448",
+ "@alfresco/adf-core": "6.6.0-7045741448",
+ "@alfresco/adf-extensions": "6.6.0-7045741448",
+ "@alfresco/eslint-plugin-eslint-angular": "6.6.0-7045741448",
+ "@alfresco/js-api": "7.5.0-7045741448",
"@angular/animations": "14.1.3",
"@angular/cdk": "14.1.3",
"@angular/common": "14.1.3",
@@ -42,8 +42,8 @@
"zone.js": "0.11.8"
},
"devDependencies": {
- "@alfresco/adf-cli": ">=6.6.0-6904949573",
- "@alfresco/adf-testing": ">=6.6.0-6904949573",
+ "@alfresco/adf-cli": "6.6.0-7045741448",
+ "@alfresco/adf-testing": "6.6.0-7045741448",
"@angular-devkit/build-angular": "14.2.11",
"@angular-devkit/core": "14.1.2",
"@angular-devkit/schematics": "14.1.2",
@@ -110,18 +110,18 @@
}
},
"node_modules/@adobe/css-tools": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.2.0.tgz",
- "integrity": "sha512-E09FiIft46CmH5Qnjb0wsW54/YQd69LsxeKUOWawmws1XWvyFGURnAChH0mlr7YPFR1ofwvUQfcL0J3lMxXqPA==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.1.tgz",
+ "integrity": "sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==",
"dev": true
},
"node_modules/@alfresco/adf-cli": {
- "version": "6.6.0-6904949573",
- "resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-6.6.0-6904949573.tgz",
- "integrity": "sha512-we5DkUUoL0MUYHn/Z4YIztVZExkgDesp0kLUAaPaBWxYbc4Dde1yfXGmDlIZbM3T1U0Resdo9IJ+BhsX9T602Q==",
+ "version": "6.6.0-7045741448",
+ "resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-6.6.0-7045741448.tgz",
+ "integrity": "sha512-Wzewr1+yjZpmM881osDg+0MvnjngP6n4HTNrHisJpgkswSnJew0b70CbZEwhYzbiXgSuN7SqhVuvMOa7QkOybA==",
"dev": true,
"dependencies": {
- "@alfresco/js-api": ">=7.2.0",
+ "@alfresco/js-api": ">=7.5.0-7045741448",
"commander": "^6.2.1",
"ejs": "^3.1.9",
"license-checker": "^25.0.1",
@@ -136,15 +136,15 @@
}
},
"node_modules/@alfresco/adf-content-services": {
- "version": "6.6.0-6904949573",
- "resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-6.6.0-6904949573.tgz",
- "integrity": "sha512-saV1lbUru+0/I7m7gIEtCrL1h/Zl/PDFtLOTw9av0XHTmb5VthnYahldW2isv1guhw05o156nsJd1TDhkIO0eQ==",
+ "version": "6.6.0-7045741448",
+ "resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-6.6.0-7045741448.tgz",
+ "integrity": "sha512-eeJv5D50nEbvMtQNMtbzXV92/bcWp4VkoCMBLuwxl3Y/5QWvOWxvwbctcNGwBDtZK8VV64y2mwm5nglGZuAFaQ==",
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
- "@alfresco/adf-core": ">=6.6.0-6904949573",
- "@alfresco/js-api": ">=7.2.0",
+ "@alfresco/adf-core": ">=6.6.0-7045741448",
+ "@alfresco/js-api": ">=7.5.0-7045741448",
"@angular/animations": ">=14.1.3",
"@angular/cdk": ">=14.1.2",
"@angular/common": ">=14.1.3",
@@ -159,9 +159,9 @@
}
},
"node_modules/@alfresco/adf-core": {
- "version": "6.6.0-6904949573",
- "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-6.6.0-6904949573.tgz",
- "integrity": "sha512-69oPZZOyfQzuNHCS6PyEosC9GmZR9OTfWJBP6xu5uixMVMG+ami0jbYVAoLwnuu8EeoZM8Tsd629FT8Lr5tK9A==",
+ "version": "6.6.0-7045741448",
+ "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-6.6.0-7045741448.tgz",
+ "integrity": "sha512-eklIQROU6/3BzONNNnJLvydflDmfPPtt+vX/1mQ8XQnUUS6qnxzQm0PDNGu5ul2GcSkrz9YY6V5ki2SH7pdP1Q==",
"dependencies": {
"angular-oauth2-oidc": "^13.0.1",
"angular-oauth2-oidc-jwks": "^13.0.1",
@@ -169,8 +169,8 @@
"tslib": "^2.3.0"
},
"peerDependencies": {
- "@alfresco/adf-extensions": ">=6.6.0-6904949573",
- "@alfresco/js-api": ">=7.2.0",
+ "@alfresco/adf-extensions": ">=6.6.0-7045741448",
+ "@alfresco/js-api": ">=7.5.0-7045741448",
"@angular/animations": ">=14.1.3",
"@angular/cdk": ">=14.1.2",
"@angular/common": ">=14.1.3",
@@ -185,45 +185,47 @@
}
},
"node_modules/@alfresco/adf-extensions": {
- "version": "6.6.0-6904949573",
- "resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-6.6.0-6904949573.tgz",
- "integrity": "sha512-Va04hh9OdYeTkJmKsiP+0De9zvuu33XMLvXNUCndLWYX9936twDiVsRZX7pK59f6lxR5yf8pfU+SwUMMsJ3gGg==",
+ "version": "6.6.0-7045741448",
+ "resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-6.6.0-7045741448.tgz",
+ "integrity": "sha512-AcLlfeX4RcewDKfb9SrOArkWsOKlyZS7aMUEiSVQgT6TE2d54suiZJaxAqBCKa6cyLWObRCJan2hGMQUHcdSWw==",
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
- "@alfresco/js-api": ">=7.2.0",
+ "@alfresco/js-api": ">=7.5.0-7045741448",
"@angular/common": ">=14.1.3",
"@angular/core": ">=14.1.3"
}
},
"node_modules/@alfresco/adf-testing": {
- "version": "6.6.0-6904949573",
- "resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-6.6.0-6904949573.tgz",
- "integrity": "sha512-encRjYI1+4iEdTV/2Kj3c/U2qyKMGG4vB/b+4dE/wSo4yvXtjkB/UlEPFdmLMNo4lArsqlTM8dMvr/oWnL6wVw==",
+ "version": "6.6.0-7045741448",
+ "resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-6.6.0-7045741448.tgz",
+ "integrity": "sha512-xSTcV9IYj9ycrx2HcpG4Y9/BNa6W69hLfBrqRn3ez8OCewOBWyf1z2wbgxCVeLO+2K8uQPS9kBhgKnxqny1q8g==",
"dev": true,
"dependencies": {
- "@alfresco/js-api": ">=7.2.0",
+ "@alfresco/js-api": ">=7.5.0-7045741448",
"@angular/compiler": "14.1.3",
"@angular/core": "14.1.3",
"date-fns": "^2.30.0",
+ "event-emitter": "^0.3.5",
"rxjs": "6.6.6",
+ "superagent": "^8.1.2",
"tslib": "^2.6.2",
"zone.js": "~0.11.4"
},
"peerDependencies": {
- "@alfresco/js-api": ">=7.2.0"
+ "@alfresco/js-api": ">=7.5.0-7045741448"
}
},
"node_modules/@alfresco/eslint-plugin-eslint-angular": {
- "version": "6.6.0-6904949573",
- "resolved": "https://registry.npmjs.org/@alfresco/eslint-plugin-eslint-angular/-/eslint-plugin-eslint-angular-6.6.0-6904949573.tgz",
- "integrity": "sha512-Ux0j11RwB0sQJhP9k0YwhVr//CT9IjC6N9IcOw8Y8hi+vEUeh3n0pGkI6eq9UWDiMutTZLKKu5hbChh80X9IJA=="
+ "version": "6.6.0-7045741448",
+ "resolved": "https://registry.npmjs.org/@alfresco/eslint-plugin-eslint-angular/-/eslint-plugin-eslint-angular-6.6.0-7045741448.tgz",
+ "integrity": "sha512-gyjrVu+jarWJjU5AQqyaZh+uKUK2dbzkC2lUeulmDXpdgesBOWRE2kVnNkmEgulQXYNZudtGa4tFKra8tCEF3Q=="
},
"node_modules/@alfresco/js-api": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-7.2.0.tgz",
- "integrity": "sha512-/Tr88IO1s1cV8RC6X9EZ2jixPJ5IQQZWR6heN406l0/eqHxroXUGShRfNZxNLZBkMn0b3uiqnAxjNo2HmB+xug==",
+ "version": "7.5.0-7045741448",
+ "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-7.5.0-7045741448.tgz",
+ "integrity": "sha512-QTR/WFaF0nEqyZY1GKjVNbgpZ9ZTbbsiJhWsbPCW9xPQV3reTN9mbkQodr5S2tJVyg3eKJ6vN6E7K6eqJVxhqg==",
"dependencies": {
"event-emitter": "^0.3.5",
"superagent": "^8.0.9",
@@ -20169,9 +20171,9 @@
}
},
"node_modules/jsrsasign": {
- "version": "10.8.6",
- "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.8.6.tgz",
- "integrity": "sha512-bQmbVtsfbgaKBTWCKiDCPlUPbdlRIK/FzSwT3BzIgZl/cU6TqXu6pZJsCI/dJVrZ9Gir5GC4woqw9shH/v7MBw==",
+ "version": "10.9.0",
+ "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.9.0.tgz",
+ "integrity": "sha512-QWLUikj1SBJGuyGK8tjKSx3K7Y69KYJnrs/pQ1KZ6wvZIkHkWjZ1PJDpuvc1/28c1uP0KW9qn1eI1LzHQqDOwQ==",
"funding": {
"url": "https://github.com/kjur/jsrsasign#donations"
}
diff --git a/package.json b/package.json
index 630acb4840..b2877c603a 100644
--- a/package.json
+++ b/package.json
@@ -33,11 +33,11 @@
},
"private": true,
"dependencies": {
- "@alfresco/adf-content-services": ">=6.6.0-6904949573",
- "@alfresco/adf-core": ">=6.6.0-6904949573",
- "@alfresco/adf-extensions": ">=6.6.0-6904949573",
- "@alfresco/eslint-plugin-eslint-angular": ">=6.6.0-6904949573",
- "@alfresco/js-api": "7.2.0",
+ "@alfresco/adf-content-services": "6.6.0-7045741448",
+ "@alfresco/adf-core": "6.6.0-7045741448",
+ "@alfresco/adf-extensions": "6.6.0-7045741448",
+ "@alfresco/eslint-plugin-eslint-angular": "6.6.0-7045741448",
+ "@alfresco/js-api": "7.5.0-7045741448",
"@angular/animations": "14.1.3",
"@angular/cdk": "14.1.3",
"@angular/common": "14.1.3",
@@ -65,8 +65,8 @@
"zone.js": "0.11.8"
},
"devDependencies": {
- "@alfresco/adf-cli": ">=6.6.0-6904949573",
- "@alfresco/adf-testing": ">=6.6.0-6904949573",
+ "@alfresco/adf-cli": "6.6.0-7045741448",
+ "@alfresco/adf-testing": "6.6.0-7045741448",
"@angular-devkit/build-angular": "14.2.11",
"@angular-devkit/core": "14.1.2",
"@angular-devkit/schematics": "14.1.2",
diff --git a/projects/aca-content/about/src/about.component.html b/projects/aca-content/about/src/about.component.html
index 808609799c..f0d2bf32f6 100644
--- a/projects/aca-content/about/src/about.component.html
+++ b/projects/aca-content/about/src/about.component.html
@@ -6,7 +6,7 @@
{{ 'APP.BROWSE.ABOUT.TITLE' | translate }}
-
+
diff --git a/projects/aca-content/assets/app.extensions.json b/projects/aca-content/assets/app.extensions.json
index 2046ea4c98..a52f7c55b5 100644
--- a/projects/aca-content/assets/app.extensions.json
+++ b/projects/aca-content/assets/app.extensions.json
@@ -1495,6 +1495,9 @@
"allowOnlyPredefinedValues": true,
"field": "TAG"
}
+ },
+ "rules": {
+ "visible": "app.areTagsEnabled"
}
},
{
@@ -1509,6 +1512,9 @@
"allowOnlyPredefinedValues": true,
"field": "cm:categories"
}
+ },
+ "rules": {
+ "visible": "app.areCategoriesEnabled"
}
}
]
@@ -2160,7 +2166,10 @@
"type": "text",
"sortable": false,
"desktopOnly": true,
- "order": 60
+ "order": 60,
+ "rules": {
+ "visible": "app.areTagsEnabled"
+ }
}
],
"libraries": [
@@ -2357,7 +2366,10 @@
"type": "text",
"sortable": false,
"desktopOnly": true,
- "order": 80
+ "order": 80,
+ "rules": {
+ "visible": "app.areTagsEnabled"
+ }
}
],
"recent": [
@@ -2422,7 +2434,10 @@
"type": "text",
"sortable": false,
"desktopOnly": true,
- "order": 60
+ "order": 60,
+ "rules": {
+ "visible": "app.areTagsEnabled"
+ }
}
],
"favorites": [
@@ -2497,7 +2512,10 @@
"type": "text",
"sortable": false,
"desktopOnly": true,
- "order": 70
+ "order": 70,
+ "rules": {
+ "visible": "app.areTagsEnabled"
+ }
}
],
"trashcan": [
diff --git a/projects/aca-content/folder-rules/src/manage-rules/manage-rules.smart-component.html b/projects/aca-content/folder-rules/src/manage-rules/manage-rules.smart-component.html
index a2b38e9c7a..e66ca3d626 100644
--- a/projects/aca-content/folder-rules/src/manage-rules/manage-rules.smart-component.html
+++ b/projects/aca-content/folder-rules/src/manage-rules/manage-rules.smart-component.html
@@ -10,7 +10,7 @@ {{ 'ACA_FOLDER_RULES.ACTIONS.MANAGE_RULES' | translat
-
+
@@ -27,6 +27,7 @@ {{ (folderInfo$ | async).name }}:{{'ACA_FOLDER_RULES.
{{ (folderInfo$ | async).name }}:{{'ACA_FOLDER_RULES.
{{ 'ACA_FOLDER_RULES.MANAGE_RULES.TOOLBAR.ACTIONS.INHERIT_RULES' | translate }}
-
+