mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[ACS-6367] action available e2e remove (#3540)
* [ACS-6367] action available e2e remove * [ci:force] * Revert "[ACS-6367] action available e2e remove" This reverts commit 0a92a383459797f970ea397c30bfb3350ba1ebeb. * [ACS-6367] action available e2e remove
This commit is contained in:
parent
610339ac5a
commit
c086bf2023
14
.github/workflows/pull-request.yml
vendored
14
.github/workflows/pull-request.yml
vendored
@ -119,20 +119,16 @@ jobs:
|
||||
id: 4
|
||||
- name: "pagination"
|
||||
id: 5
|
||||
- name: "actionsAvailableFilesFolders"
|
||||
id: 6
|
||||
- name: "actionsAvailableLibraries,actionsAvailableNewMenu"
|
||||
id: 7
|
||||
- name: "copyMoveActions"
|
||||
id: 8
|
||||
id: 6
|
||||
- name: "deleteActions"
|
||||
id: 9
|
||||
id: 7
|
||||
- name: "editActions,favoriteActions"
|
||||
id: 10
|
||||
id: 8
|
||||
- name: "libraryActions"
|
||||
id: 11
|
||||
id: 9
|
||||
- name: "uploadDownloadActions"
|
||||
id: 12
|
||||
id: 10
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
@ -1,166 +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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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 { 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 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
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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');
|
||||
});
|
||||
});
|
||||
});
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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
|
||||
};
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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);
|
||||
});
|
||||
});
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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);
|
||||
});
|
||||
});
|
||||
});
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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);
|
||||
});
|
||||
});
|
||||
});
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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
|
||||
};
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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');
|
||||
});
|
||||
});
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<void> {
|
||||
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<void> {
|
||||
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<void> {
|
||||
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<void> {
|
||||
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<void> {
|
||||
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<void> {
|
||||
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<void> {
|
||||
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));
|
@ -51,7 +51,6 @@ exports.config = {
|
||||
|
||||
specs: [
|
||||
'./e2e/protractor/suites/actions/**/**/*test.ts',
|
||||
'./e2e/protractor/suites/actions-available/**/**/*test.ts',
|
||||
'./e2e/protractor/suites/application/**/*test.ts',
|
||||
'./e2e/protractor/suites/authentication/**/*test.ts',
|
||||
'./e2e/protractor/suites/extensions/**/*test.ts',
|
||||
@ -73,10 +72,6 @@ exports.config = {
|
||||
shareActions: './e2e/protractor/suites/actions/share/**/**/*test.ts',
|
||||
uploadDownloadActions: './e2e/protractor/suites/actions/upload-download/**/**/*test.ts',
|
||||
|
||||
actionsAvailableFilesFolders: './e2e/protractor/suites/actions-available/files-folders/**/**/*test.ts',
|
||||
actionsAvailableLibraries: './e2e/protractor/suites/actions-available/libraries/**/**/*test.ts',
|
||||
actionsAvailableNewMenu: './e2e/protractor/suites/actions-available/new-menu/**/**/*test.ts',
|
||||
|
||||
application: './e2e/protractor/suites/application/**/*test.ts',
|
||||
authentication: './e2e/protractor/suites/authentication/**/*test.ts',
|
||||
extensions: './e2e/protractor/suites/extensions/**/*test.ts',
|
||||
|
Loading…
x
Reference in New Issue
Block a user