From 07f45e08cf5368746247d2934023e6d1504a6c55 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Thu, 14 Mar 2019 15:40:38 +0000 Subject: [PATCH] various bug fixes (#1010) * various bug fixes * use 'remove favorite' label where appropriate * fix toggle favorite component labels * e2e type check and fixes * favorite library label * support toggle favorite component selectors * update tests * update e2e tests * update e2e * e2e update * update e2e --- e2e/components/menu/menu.ts | 19 ++- e2e/components/toolbar/toolbar.ts | 5 + .../context-menu-multiple-selection.test.ts | 32 ++--- .../context-menu-single-selection.test.ts | 40 +++--- e2e/suites/actions/mark-favorite.test.ts | 28 ++-- ...cial-permissions-available-actions.test.ts | 126 +++++++++--------- .../toolbar-multiple-selection.test.ts | 32 ++--- .../actions/toolbar-single-selection.test.ts | 40 +++--- e2e/suites/viewer/viewer-actions.test.ts | 10 +- e2e/tsconfig.e2e.typecheck.json | 7 + .../repo-client/apis/queries/queries-api.ts | 8 +- package.json | 3 +- .../src/lib/aos-extension.service.ts | 4 +- .../current-user/current-user.component.html | 8 +- .../current-user/current-user.component.ts | 7 +- .../toggle-favorite-library.component.ts | 8 +- .../toggle-favorite.component.ts | 6 +- src/assets/app.extensions.json | 6 +- 18 files changed, 218 insertions(+), 171 deletions(-) create mode 100644 e2e/tsconfig.e2e.typecheck.json diff --git a/e2e/components/menu/menu.ts b/e2e/components/menu/menu.ts index dc62df1285..06c5e4f5dc 100755 --- a/e2e/components/menu/menu.ts +++ b/e2e/components/menu/menu.ts @@ -38,6 +38,8 @@ export class Menu extends Component { submenu: 'app-context-menu-item .mat-menu-item', editFolder: `.mat-menu-item[id$='editFolder']`, + favoriteAction: `.mat-menu-item[id$='favorite.add']`, + removeFavoriteAction: `.mat-menu-item[id$='favorite.remove']`, editOffline: `.mat-menu-item[title='Edit offline']`, cancelEditing: `.mat-menu-item[title='Cancel editing']` }; @@ -56,7 +58,10 @@ export class Menu extends Component { downloadAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Download')); editFolderAction: ElementFinder = this.component.element(by.css(Menu.selectors.editFolder)); editOfflineAction: ElementFinder = this.component.element(by.css(Menu.selectors.editOffline)); - favoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Favorite')); + favoriteAction: ElementFinder = this.component.element(by.css(Menu.selectors.favoriteAction)); + removeFavoriteAction: ElementFinder = this.component.element(by.css(Menu.selectors.removeFavoriteAction)); + toggleFavoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Favorite')); + toggleRemoveFavoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Remove favorite')); joinAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Join')); leaveAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Leave')); managePermissionsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Permissions')); @@ -260,6 +265,18 @@ export class Menu extends Component { return await this.favoriteAction.isPresent(); } + async isRemoveFavoritePresent() { + return await this.removeFavoriteAction.isPresent(); + } + + async isToggleFavoritePresent() { + return await this.toggleFavoriteAction.isPresent(); + } + + async isToggleRemoveFavoritePresent() { + return await this.toggleRemoveFavoriteAction.isPresent(); + } + async isJoinLibraryPresent() { return await this.joinAction.isPresent(); } diff --git a/e2e/components/toolbar/toolbar.ts b/e2e/components/toolbar/toolbar.ts index 2525f594e2..0af8f30d12 100755 --- a/e2e/components/toolbar/toolbar.ts +++ b/e2e/components/toolbar/toolbar.ts @@ -207,6 +207,11 @@ export class Toolbar extends Component { return await this.menu.clickMenuItem('Favorite'); } + async clickMoreActionsRemoveFavorite() { + await this.openMoreMenu(); + return await this.menu.clickMenuItem('Remove favorite'); + } + async clickMoreActionsDelete() { await this.openMoreMenu(); return await this.menu.clickMenuItem('Delete'); diff --git a/e2e/suites/actions/context-menu-multiple-selection.test.ts b/e2e/suites/actions/context-menu-multiple-selection.test.ts index 6e37b01e54..ac990c7bc1 100755 --- a/e2e/suites/actions/context-menu-multiple-selection.test.ts +++ b/e2e/suites/actions/context-menu-multiple-selection.test.ts @@ -173,7 +173,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -189,7 +189,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -206,7 +206,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -223,7 +223,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -337,7 +337,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is not displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -354,7 +354,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is not displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -385,7 +385,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -402,7 +402,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -433,7 +433,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -450,7 +450,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -467,7 +467,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -484,7 +484,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -588,7 +588,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleFavoritePresent()).toBe(true, `Toggle favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -608,7 +608,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleFavoritePresent()).toBe(true, `Toggle favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -628,7 +628,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleFavoritePresent()).toBe(true, `Toggle favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); @@ -648,7 +648,7 @@ describe('Context menu actions - multiple selection : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleFavoritePresent()).toBe(true, `Toggle favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); }); diff --git a/e2e/suites/actions/context-menu-single-selection.test.ts b/e2e/suites/actions/context-menu-single-selection.test.ts index 02e79d066a..fa023bbd50 100755 --- a/e2e/suites/actions/context-menu-single-selection.test.ts +++ b/e2e/suites/actions/context-menu-single-selection.test.ts @@ -183,7 +183,7 @@ describe('Context menu actions - single selection : ', () => { expect(await contextMenu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed for ${fileUser}`); expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${fileUser}`); expect(await contextMenu.isViewPresent()).toBe(true, `View is not displayed for ${fileUser}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileUser}`); + expect(await contextMenu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileUser}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileUser}`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed for ${fileUser}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileUser}`); @@ -202,7 +202,7 @@ describe('Context menu actions - single selection : ', () => { expect(await contextMenu.isCancelEditingPresent()).toBe(true, `Cancel editing is not displayed for ${fileLocked}`); expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${fileLocked}`); expect(await contextMenu.isViewPresent()).toBe(true, `View is not displayed for ${fileLocked}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await contextMenu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileLocked}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed for ${fileLocked}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileLocked}`); @@ -219,7 +219,7 @@ describe('Context menu actions - single selection : ', () => { expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${folderUser}`); expect(await contextMenu.isEditFolderPresent()).toBe(true, `Edit folder is not displayed for ${folderUser}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${folderUser}`); + expect(await contextMenu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${folderUser}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${folderUser}`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed for ${folderUser}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${folderUser}`); @@ -323,7 +323,7 @@ describe('Context menu actions - single selection : ', () => { expect(await dataTable.hasContextMenu()).toBe(true, 'Context menu is not displayed'); expect(await contextMenu.isLeaveLibraryPresent()).toBe(true, `Leave is not displayed for ${siteName}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${siteName}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${siteName}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${siteName}`); }); it('Available actions for a library - Favorite Libraries - user is a member - [C290081]', async () => { @@ -333,7 +333,7 @@ describe('Context menu actions - single selection : ', () => { expect(await dataTable.hasContextMenu()).toBe(true, 'Context menu is not displayed'); expect(await contextMenu.isLeaveLibraryPresent()).toBe(true, `Leave is not displayed for ${siteName}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${siteName}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${siteName}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${siteName}`); }); it('Available actions for a library - Favorite Libraries - user is not a member - [C290082]', async () => { @@ -343,7 +343,7 @@ describe('Context menu actions - single selection : ', () => { expect(await dataTable.hasContextMenu()).toBe(true, 'Context menu is not displayed'); expect(await contextMenu.isJoinLibraryPresent()).toBe(true, `Join is not displayed for ${adminPublic}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${adminPublic}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${adminPublic}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${adminPublic}`); }); it('Available actions for a moderated library - Favorite Libraries - user requested to join - [C290089]', async () => { @@ -353,7 +353,7 @@ describe('Context menu actions - single selection : ', () => { expect(await dataTable.hasContextMenu()).toBe(true, 'Context menu is not displayed'); expect(await contextMenu.isCancelJoinPresent()).toBe(true, `Cancel join is not displayed for ${adminModerated}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${adminModerated}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${adminModerated}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${adminModerated}`); }); it('Available actions for a library - Search Results - user is a member - [C291812]', async () => { @@ -365,7 +365,7 @@ describe('Context menu actions - single selection : ', () => { expect(await dataTable.hasContextMenu()).toBe(true, 'Context menu is not displayed'); expect(await contextMenu.isLeaveLibraryPresent()).toBe(true, `Leave is not displayed for ${siteName}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${siteName}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${siteName}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${siteName}`); }); it('Available actions for a library - Search Results - user is not a member - [C291813]', async () => { @@ -377,7 +377,7 @@ describe('Context menu actions - single selection : ', () => { expect(await dataTable.hasContextMenu()).toBe(true, 'Context menu is not displayed'); expect(await contextMenu.isJoinLibraryPresent()).toBe(true, `Join is not displayed for ${adminPublic}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${adminPublic}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${adminPublic}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${adminPublic}`); }); it('Available actions for a moderated library - Search Results - user requested to join - [C291814]', async () => { @@ -389,7 +389,7 @@ describe('Context menu actions - single selection : ', () => { expect(await dataTable.hasContextMenu()).toBe(true, 'Context menu is not displayed'); expect(await contextMenu.isCancelJoinPresent()).toBe(true, `Cancel join is not displayed for ${adminModerated}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${adminModerated}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${adminModerated}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${adminModerated}`); }); }); @@ -413,7 +413,7 @@ describe('Context menu actions - single selection : ', () => { expect(await contextMenu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed for ${fileUser}`); expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${fileUser}`); expect(await contextMenu.isViewPresent()).toBe(true, `View is not displayed for ${fileUser}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileUser}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${fileUser}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileUser}`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed for ${fileUser}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileUser}`); @@ -433,7 +433,7 @@ describe('Context menu actions - single selection : ', () => { expect(await contextMenu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed for ${fileLocked}`); expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${fileLocked}`); expect(await contextMenu.isViewPresent()).toBe(true, `View is not displayed for ${fileLocked}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${fileLocked}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed for ${fileLocked}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileLocked}`); @@ -465,7 +465,7 @@ describe('Context menu actions - single selection : ', () => { expect(await contextMenu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed for ${fileUser}`); expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${fileUser}`); expect(await contextMenu.isViewPresent()).toBe(true, `View is not displayed for ${fileUser}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileUser}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${fileUser}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileUser}`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed for ${fileUser}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileUser}`); @@ -484,7 +484,7 @@ describe('Context menu actions - single selection : ', () => { expect(await contextMenu.isCancelEditingPresent()).toBe(true, `Cancel editing is not displayed for ${fileLocked}`); expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${fileLocked}`); expect(await contextMenu.isViewPresent()).toBe(true, `View is not displayed for ${fileLocked}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${fileLocked}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed for ${fileLocked}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileLocked}`); @@ -517,7 +517,7 @@ describe('Context menu actions - single selection : ', () => { expect(await contextMenu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed for ${fileUser}`); expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${fileUser}`); expect(await contextMenu.isViewPresent()).toBe(true, `View is not displayed for ${fileUser}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileUser}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${fileUser}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileUser}`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed for ${fileUser}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileUser}`); @@ -536,7 +536,7 @@ describe('Context menu actions - single selection : ', () => { expect(await contextMenu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed for ${fileLocked}`); expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${fileLocked}`); expect(await contextMenu.isViewPresent()).toBe(true, `View is not displayed for ${fileLocked}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${fileLocked}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed for ${fileLocked}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileLocked}`); @@ -552,7 +552,7 @@ describe('Context menu actions - single selection : ', () => { expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${folderUser}`); expect(await contextMenu.isEditFolderPresent()).toBe(true, `Edit folder is not displayed for ${folderUser}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${folderUser}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${folderUser}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${folderUser}`); expect(await contextMenu.isMovePresent()).toBe(true, `Move is not displayed for ${folderUser}`); expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is not displayed for ${folderUser}`); @@ -639,7 +639,7 @@ describe('Context menu actions - single selection : ', () => { expect(await contextMenu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed for ${fileSiteUser}`); expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${fileSiteUser}`); expect(await contextMenu.isViewPresent()).toBe(true, `View is not displayed for ${fileSiteUser}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileSiteUser}`); + expect(await contextMenu.isToggleFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${fileSiteUser}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileSiteUser}`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed for ${fileSiteUser}`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed for ${fileSiteUser}`); @@ -661,7 +661,7 @@ describe('Context menu actions - single selection : ', () => { expect(await contextMenu.isCancelEditingPresent()).toBe(true, `Cancel editing is not displayed for ${fileLocked}`); expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${fileLocked}`); expect(await contextMenu.isViewPresent()).toBe(true, `View is not displayed for ${fileLocked}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${fileLocked}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed for ${fileLocked}`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed for ${fileLocked}`); @@ -681,7 +681,7 @@ describe('Context menu actions - single selection : ', () => { expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${folderSiteUser}`); expect(await contextMenu.isEditFolderPresent()).toBe(true, `Edit folder is not displayed for ${folderSiteUser}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${folderSiteUser}`); + expect(await contextMenu.isToggleFavoritePresent()).toBe(true, `Toggle favorite is not displayed for ${folderSiteUser}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${folderSiteUser}`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed for ${folderSiteUser}`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed for ${folderSiteUser}`); diff --git a/e2e/suites/actions/mark-favorite.test.ts b/e2e/suites/actions/mark-favorite.test.ts index 82a5977803..d2bd96fc9b 100644 --- a/e2e/suites/actions/mark-favorite.test.ts +++ b/e2e/suites/actions/mark-favorite.test.ts @@ -123,7 +123,7 @@ describe('Mark items as favorites', () => { await dataTable.selectItem(fileFavUI); await toolbar.openMoreMenu(); - expect(await toolbar.menu.getItemIconText('Favorite')).toEqual('star'); + expect(await toolbar.menu.getItemIconText('Remove favorite')).toEqual('star'); }); it('favorite a file - [C217189]', async () => { @@ -142,7 +142,7 @@ describe('Mark items as favorites', () => { it('unfavorite an item - [C217190]', async () => { await dataTable.selectItem(fileFav1); - await toolbar.clickMoreActionsFavorite(); + await toolbar.clickMoreActionsRemoveFavorite(); expect(await apis.user.favorites.isFavoriteWithRetry(fileFav1Id, { expect: false })).toBe(false, `${fileFav1} is marked as favorite`); }); @@ -165,7 +165,7 @@ describe('Mark items as favorites', () => { it('unfavorite multiple items - [C217193]', async () => { await dataTable.selectMultipleItems([ fileFav3, fileFav4 ]) - await toolbar.clickMoreActionsFavorite(); + await toolbar.clickMoreActionsRemoveFavorite(); expect(await apis.user.favorites.isFavoriteWithRetry(fileFav3Id, { expect: false })).toBe(false, `${fileFav3} marked as favorite`); expect(await apis.user.favorites.isFavoriteWithRetry(fileFav4Id, { expect: false })).toBe(false, `${fileFav4} marked as favorite`); @@ -195,7 +195,7 @@ describe('Mark items as favorites', () => { it('unfavorite an item - [C280353]', async () => { await dataTable.selectItem(fileFav1); - await toolbar.clickMoreActionsFavorite(); + await toolbar.clickMoreActionsRemoveFavorite(); expect(await apis.user.favorites.isFavoriteWithRetry(fileFav1Id, { expect: false })).toBe(false, `${fileFav1} is marked as favorite`); }); @@ -218,7 +218,7 @@ describe('Mark items as favorites', () => { it('unfavorite multiple items - [C280356]', async () => { await dataTable.selectMultipleItems([ fileFav3, fileFav4 ]); - await toolbar.clickMoreActionsFavorite(); + await toolbar.clickMoreActionsRemoveFavorite(); expect(await apis.user.favorites.isFavoriteWithRetry(fileFav3Id, { expect: false })).toBe(false, `${fileFav3} marked as favorite`); expect(await apis.user.favorites.isFavoriteWithRetry(fileFav4Id, { expect: false })).toBe(false, `${fileFav4} marked as favorite`); @@ -248,7 +248,7 @@ describe('Mark items as favorites', () => { it('unfavorite an item - [C280363]', async () => { await dataTable.selectItem(fileFav1); - await toolbar.clickMoreActionsFavorite(); + await toolbar.clickMoreActionsRemoveFavorite(); expect(await apis.user.favorites.isFavoriteWithRetry(fileFav1Id, { expect: false })).toBe(false, `${fileFav1} is marked as favorite`); }); @@ -271,7 +271,7 @@ describe('Mark items as favorites', () => { it('unfavorite multiple items - [C280366]', async () => { await dataTable.selectMultipleItems([ fileFav3, fileFav4 ]); - await toolbar.clickMoreActionsFavorite(); + await toolbar.clickMoreActionsRemoveFavorite(); expect(await apis.user.favorites.isFavoriteWithRetry(fileFav3Id, { expect: false })).toBe(false, `${fileFav3} marked as favorite`); expect(await apis.user.favorites.isFavoriteWithRetry(fileFav4Id, { expect: false })).toBe(false, `${fileFav4} marked as favorite`); @@ -295,7 +295,7 @@ describe('Mark items as favorites', () => { it('unfavorite an item - [C280368]', async () => { await dataTable.selectItem(fileFav1); - await toolbar.clickMoreActionsFavorite(); + await toolbar.clickMoreActionsRemoveFavorite(); expect(await apis.user.favorites.isFavoriteWithRetry(fileFav1Id, { expect: false })).toBe(false, `${fileFav1} is marked as favorite`); expect(await dataTable.isItemPresent(fileFav1)).toBe(false, 'item still displayed'); @@ -303,7 +303,7 @@ describe('Mark items as favorites', () => { it('unfavorite multiple items - [C280374]', async () => { await dataTable.selectMultipleItems([ fileFav3, fileFav4 ]); - await toolbar.clickMoreActionsFavorite(); + await toolbar.clickMoreActionsRemoveFavorite(); expect(await apis.user.favorites.isFavoriteWithRetry(fileFav3Id, { expect: false })).toBe(false, `${fileFav3} marked as favorite`); expect(await apis.user.favorites.isFavoriteWithRetry(fileFav4Id, { expect: false })).toBe(false, `${fileFav4} marked as favorite`); @@ -315,7 +315,7 @@ describe('Mark items as favorites', () => { await dataTable.selectItem(fileFav2); await toolbar.openMoreMenu(); - expect(await toolbar.menu.getItemIconText('Favorite')).toEqual('star'); + expect(await toolbar.menu.getItemIconText('Remove favorite')).toEqual('star'); }); }); @@ -391,7 +391,7 @@ describe('Mark items as favorites', () => { it('Unfavorite an item - [C280343]', async () => { await page.dataTable.doubleClickOnRowByName(folderSite); await dataTable.selectItem(fileSiteFav1); - await toolbar.clickMoreActionsFavorite(); + await toolbar.clickMoreActionsRemoveFavorite(); expect(await apis.user.favorites.isFavoriteWithRetry(fileSiteFav1Id, { expect: false })).toBe(false, `${fileSiteFav1} is marked as favorite`); }); @@ -408,7 +408,7 @@ describe('Mark items as favorites', () => { it('Unfavorite multiple items - [C280346]', async () => { await page.dataTable.doubleClickOnRowByName(folderSite); await dataTable.selectMultipleItems([ fileSiteFav2, fileSiteFav3 ]); - await toolbar.clickMoreActionsFavorite(); + await toolbar.clickMoreActionsRemoveFavorite(); expect(await apis.user.favorites.isFavoriteWithRetry(fileSiteFav2Id, { expect: false })).toBe(false, 'item marked as favorite'); expect(await apis.user.favorites.isFavoriteWithRetry(fileSiteFav3Id, { expect: false })).toBe(false, 'item marked as favorite'); @@ -465,7 +465,7 @@ describe('Mark items as favorites', () => { it('Remove a library from favorites - on My Libraries - [C289975]', async () => { await page.goToMyLibrariesAndWait(); await dataTable.selectItem(adminSite2); - await toolbar.clickMoreActionsFavorite(); + await toolbar.clickMoreActionsRemoveFavorite(); expect(await apis.user.favorites.isFavoriteWithRetry(adminSite2, { expect: false })).toBe(false, `${adminSite2} still favorite`); }); @@ -473,7 +473,7 @@ describe('Mark items as favorites', () => { it('Remove a library from favorites - on Favorite Libraries - [C289976]', async () => { await page.goToFavoriteLibrariesAndWait(); await dataTable.selectItem(adminSite3); - await toolbar.clickMoreActionsFavorite(); + await toolbar.clickMoreActionsRemoveFavorite(); expect(await dataTable.isItemPresent(adminSite3)).toBe(false, `${adminSite3} is displayed`); expect(await apis.user.favorites.isFavoriteWithRetry(adminSite3, { expect: false })).toBe(false, `${adminSite3} still favorite`); diff --git a/e2e/suites/actions/special-permissions-available-actions.test.ts b/e2e/suites/actions/special-permissions-available-actions.test.ts index e0f7b3c79e..dd8c8e72d8 100755 --- a/e2e/suites/actions/special-permissions-available-actions.test.ts +++ b/e2e/suites/actions/special-permissions-available-actions.test.ts @@ -159,7 +159,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed for selected files`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for selected files`); @@ -182,7 +182,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed for selected files`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for selected files`); @@ -207,7 +207,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is displayed for selected files`); // TODO: change expect to false when ACA-1737 is done expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed for selected files`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for selected files`); @@ -232,7 +232,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed for selected files`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for selected files`); @@ -272,7 +272,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${file1}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${file1}`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${file1}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${file1}`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${file1}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed for ${file1}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for ${file1}`); @@ -296,7 +296,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${file1}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${file1}`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${file1}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${file1}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${file1}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed for ${file1}`); // TODO: change expect to false when ACA-2173 is done expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is displayed for ${file1}`); @@ -324,7 +324,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is displayed for ${file1}`); // TODO: change expect to false when ACA-1737 is done expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is displayed for ${file1}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${file1}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${file1}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed for ${file1}`); // TODO: change expect to false when ACA-1737 is done expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is displayed for ${file1}`); @@ -351,7 +351,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${file1}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${file1}`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${file1}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${file1}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${file1}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed for ${file1}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for ${file1}`); @@ -391,7 +391,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${folder1}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${folder1}`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${folder1}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${folder1}`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${folder1}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed for ${folder1}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for ${folder1}`); @@ -418,7 +418,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is displayed for ${folder1}`); // TODO: change expect to false when ACA-1737 is done expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is displayed for ${folder1}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${folder1}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${folder1}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed for ${folder1}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for ${folder1}`); @@ -444,7 +444,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${folder1}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${folder1}`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${folder1}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${folder1}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${folder1}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed for ${folder1}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for ${folder1}`); @@ -483,7 +483,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); @@ -506,7 +506,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); @@ -531,7 +531,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is displayed for selected files`); // TODO: change expect to false when ACA-1737 is done expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); @@ -556,7 +556,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); @@ -595,7 +595,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); @@ -620,7 +620,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is displayed`); // TODO: change expect to false when ACA-1737 is done expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is displayed`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); @@ -645,7 +645,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); @@ -684,7 +684,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); @@ -709,7 +709,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is displayed`); // TODO: change expect to false when ACA-1737 is done expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is displayed`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); @@ -734,7 +734,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); @@ -765,7 +765,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed for ${file1}`); expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${file1}`); expect(await contextMenu.isViewPresent()).toBe(true, `View is not displayed for ${file1}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${file1}`); + expect(await contextMenu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${file1}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${file1}`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed for ${file1}`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed for ${file1}`); @@ -784,7 +784,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed for ${file1}`); expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${file1}`); expect(await contextMenu.isViewPresent()).toBe(true, `View is not displayed for ${file1}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${file1}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${file1}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${file1}`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed for ${file1}`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed for ${file1}`); @@ -804,7 +804,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed for ${file1}`); expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${file1}`); expect(await contextMenu.isViewPresent()).toBe(true, `View is not displayed for ${file1}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${file1}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${file1}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${file1}`); // TODO: change expect to false when ACA-1737 is done expect(await contextMenu.isMovePresent()).toBe(true, `Move is displayed for ${file1}`); @@ -829,7 +829,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed for ${file1}`); expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${file1}`); expect(await contextMenu.isViewPresent()).toBe(true, `View is not displayed for ${file1}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${file1}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${file1}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${file1}`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed for ${file1}`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed for ${file1}`); @@ -862,7 +862,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${folder1}`); expect(await contextMenu.isEditFolderPresent()).toBe(false, `Edit folder is displayed for ${folder1}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${folder1}`); + expect(await contextMenu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${folder1}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${folder1}`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed for ${folder1}`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed for ${folder1}`); @@ -881,7 +881,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${folder1}`); // TODO: change expect to false when ACA-1737 is done expect(await contextMenu.isEditFolderPresent()).toBe(true, `Edit folder is displayed for ${folder1}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${folder1}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${folder1}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${folder1}`); // TODO: change expect to false when ACA-1737 is done expect(await contextMenu.isMovePresent()).toBe(true, `Move is displayed for ${folder1}`); @@ -903,7 +903,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isDownloadPresent()).toBe(true, `Download is not displayed for ${folder1}`); expect(await contextMenu.isEditFolderPresent()).toBe(false, `Edit folder is displayed for ${folder1}`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${folder1}`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${folder1}`); expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed for ${folder1}`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed for ${folder1}`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed for ${folder1}`); @@ -916,7 +916,7 @@ describe('Special permissions available actions : ', () => { }); }); - describe('context menu actions are correct for multiple selection of files', () => { + describe('context menu actions are correct for multiple selection of files', () => { beforeEach(async (done) => { await Utils.pressEscape(); await dataTable.clearSelection(); @@ -943,7 +943,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage Versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); expect(await contextMenu.isSharePresent()).toBe(false, `Share is displayed`); @@ -961,7 +961,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage Versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); expect(await contextMenu.isSharePresent()).toBe(false, `Share is displayed`); @@ -981,7 +981,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is displayed`); // TODO: change expect to false when ACA-1737 is done expect(await contextMenu.isMovePresent()).toBe(true, `Move is displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage Versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); expect(await contextMenu.isSharePresent()).toBe(false, `Share is displayed`); @@ -1001,7 +1001,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage Versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); expect(await contextMenu.isSharePresent()).toBe(false, `Share is displayed`); @@ -1036,7 +1036,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage Versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); expect(await contextMenu.isSharePresent()).toBe(false, `Share is displayed`); @@ -1057,7 +1057,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is displayed`); // TODO: change expect to false when ACA-1737 is done expect(await contextMenu.isMovePresent()).toBe(true, `Move is displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage Versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); expect(await contextMenu.isSharePresent()).toBe(false, `Share is displayed`); @@ -1078,7 +1078,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage Versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); expect(await contextMenu.isSharePresent()).toBe(false, `Share is displayed`); @@ -1112,7 +1112,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage Versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); expect(await contextMenu.isSharePresent()).toBe(false, `Share is displayed`); @@ -1132,7 +1132,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isDeletePresent()).toBe(true, `Delete is displayed`); // TODO: change expect to false when ACA-1737 is done expect(await contextMenu.isMovePresent()).toBe(true, `Move is displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage Versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); expect(await contextMenu.isSharePresent()).toBe(false, `Share is displayed`); @@ -1152,7 +1152,7 @@ describe('Special permissions available actions : ', () => { expect(await contextMenu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`); - expect(await contextMenu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await contextMenu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage Versions is displayed`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed`); expect(await contextMenu.isSharePresent()).toBe(false, `Share is displayed`); @@ -1190,7 +1190,7 @@ describe('Special permissions available actions : ', () => { expect(await viewerToolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await viewerToolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); - expect(await viewerToolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await viewerToolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await viewerToolbar.menu.isSharePresent()).toBe(false, `Share is displayed in More actions`); expect(await viewerToolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await viewerToolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); @@ -1217,7 +1217,7 @@ describe('Special permissions available actions : ', () => { expect(await viewerToolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await viewerToolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); - expect(await viewerToolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await viewerToolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await viewerToolbar.menu.isSharePresent()).toBe(false, `Share is displayed in More actions`); expect(await viewerToolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await viewerToolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); @@ -1244,7 +1244,7 @@ describe('Special permissions available actions : ', () => { expect(await viewerToolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await viewerToolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); - expect(await viewerToolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await viewerToolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await viewerToolbar.menu.isSharePresent()).toBe(false, `Share is displayed in More actions`); expect(await viewerToolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await viewerToolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); @@ -1282,7 +1282,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${file1}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${file1}`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${file1}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${file1}`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${file1}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is not displayed`); @@ -1307,7 +1307,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${file1}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${file1}`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${file1}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${file1}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${file1}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is not displayed`); @@ -1335,7 +1335,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is displayed for ${file1}`); // TODO: change expect to false when ACA-1737 is done expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is displayed for ${file1}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${file1}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${file1}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is not displayed`); @@ -1361,7 +1361,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${file1}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${file1}`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${file1}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${file1}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${file1}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is not displayed`); @@ -1399,7 +1399,7 @@ describe('Special permissions available actions : ', () => { expect(await viewerToolbar.menu.isEditOfflinePresent()).toBe(true, `Edit offline is not displayed`); expect(await viewerToolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); - expect(await viewerToolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await viewerToolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await viewerToolbar.menu.isSharePresent()).toBe(false, `Share is displayed in More actions`); expect(await viewerToolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await viewerToolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); @@ -1426,7 +1426,7 @@ describe('Special permissions available actions : ', () => { expect(await viewerToolbar.menu.isEditOfflinePresent()).toBe(true, `Edit offline is not displayed`); expect(await viewerToolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); - expect(await viewerToolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await viewerToolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await viewerToolbar.menu.isSharePresent()).toBe(false, `Share is displayed in More actions`); expect(await viewerToolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await viewerToolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); @@ -1453,7 +1453,7 @@ describe('Special permissions available actions : ', () => { expect(await viewerToolbar.menu.isEditOfflinePresent()).toBe(true, `Edit offline is not displayed`); expect(await viewerToolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); - expect(await viewerToolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await viewerToolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove Favorite is not displayed`); expect(await viewerToolbar.menu.isSharePresent()).toBe(false, `Share is displayed in More actions`); expect(await viewerToolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await viewerToolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); @@ -1491,7 +1491,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${fileLocked}`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${fileLocked}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileLocked}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, 'Manage versions is not displayed'); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, 'Upload new version is not displayed'); @@ -1516,7 +1516,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${fileLocked}`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${fileLocked}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileLocked}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, 'Manage versions is not displayed'); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, 'Upload new version is not displayed'); @@ -1544,7 +1544,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is displayed for ${fileLocked}`); // TODO: change expect to false when ACA-1737 is fixed expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is displayed for ${fileLocked}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileLocked}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, 'Manage versions is not displayed'); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, 'Upload new version is not displayed'); @@ -1570,7 +1570,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${fileLocked}`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${fileLocked}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileLocked}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, 'Manage versions is not displayed'); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, 'Upload new version is not displayed'); @@ -1608,7 +1608,7 @@ describe('Special permissions available actions : ', () => { expect(await viewerToolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await viewerToolbar.menu.isCancelEditingPresent()).toBe(true, `Cancel editing is not displayed`); - expect(await viewerToolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await viewerToolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await viewerToolbar.menu.isSharePresent()).toBe(false, `Share is displayed in More actions`); expect(await viewerToolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await viewerToolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); @@ -1635,7 +1635,7 @@ describe('Special permissions available actions : ', () => { expect(await viewerToolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await viewerToolbar.menu.isCancelEditingPresent()).toBe(true, `Cancel editing is not displayed`); - expect(await viewerToolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await viewerToolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await viewerToolbar.menu.isSharePresent()).toBe(false, `Share is displayed in More actions`); expect(await viewerToolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await viewerToolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); @@ -1663,7 +1663,7 @@ describe('Special permissions available actions : ', () => { expect(await viewerToolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await viewerToolbar.menu.isCancelEditingPresent()).toBe(true, `Cancel editing is not displayed`); - expect(await viewerToolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await viewerToolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await viewerToolbar.menu.isSharePresent()).toBe(false, `Share is displayed in More actions`); expect(await viewerToolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await viewerToolbar.menu.isMovePresent()).toBe(false, `Move is displayed`); @@ -1701,7 +1701,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileLocked}`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for ${fileLocked}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileLocked}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, 'Manage versions is not displayed'); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, 'Upload new version is displayed'); @@ -1726,7 +1726,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileLocked}`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for ${fileLocked}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileLocked}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, 'Manage versions is not displayed'); // TODO: change expect to false when ACA-2173 is done expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, 'Upload new version is displayed'); @@ -1753,7 +1753,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileLocked}`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for ${fileLocked}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileLocked}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, 'Manage versions is not displayed'); // TODO: change expect to false when ACA-1737 is done expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, 'Upload new version is displayed'); @@ -1780,7 +1780,7 @@ describe('Special permissions available actions : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${fileLocked} in Search Results`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${fileLocked} in Search Results`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileLocked}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, 'Manage versions is not displayed'); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, 'Upload new version is displayed'); @@ -1818,7 +1818,7 @@ describe('Special permissions available actions : ', () => { expect(await viewerToolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await viewerToolbar.menu.isCancelEditingPresent()).toBe(true, `Cancel editing is not displayed`); - expect(await viewerToolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await viewerToolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await viewerToolbar.menu.isSharePresent()).toBe(false, `Share is displayed in More actions`); expect(await viewerToolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await viewerToolbar.menu.isMovePresent()).toBe(true, `Move is not displayed`); @@ -1845,7 +1845,7 @@ describe('Special permissions available actions : ', () => { expect(await viewerToolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await viewerToolbar.menu.isCancelEditingPresent()).toBe(true, `Cancel editing is not displayed`); - expect(await viewerToolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await viewerToolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await viewerToolbar.menu.isSharePresent()).toBe(false, `Share is displayed in More actions`); expect(await viewerToolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await viewerToolbar.menu.isMovePresent()).toBe(true, `Move is not displayed`); @@ -1873,7 +1873,7 @@ describe('Special permissions available actions : ', () => { expect(await viewerToolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await viewerToolbar.menu.isCancelEditingPresent()).toBe(true, `Cancel editing is not displayed`); - expect(await viewerToolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await viewerToolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await viewerToolbar.menu.isSharePresent()).toBe(false, `Share is displayed in More actions`); expect(await viewerToolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await viewerToolbar.menu.isMovePresent()).toBe(true, `Move is not displayed`); diff --git a/e2e/suites/actions/toolbar-multiple-selection.test.ts b/e2e/suites/actions/toolbar-multiple-selection.test.ts index 31c2f4ba4b..4e19b30a56 100755 --- a/e2e/suites/actions/toolbar-multiple-selection.test.ts +++ b/e2e/suites/actions/toolbar-multiple-selection.test.ts @@ -177,7 +177,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove Favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -198,7 +198,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -219,7 +219,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -240,7 +240,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -374,7 +374,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -395,7 +395,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -430,7 +430,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -451,7 +451,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -486,7 +486,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -507,7 +507,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -528,7 +528,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -549,7 +549,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -619,7 +619,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -643,7 +643,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -667,7 +667,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); @@ -691,7 +691,7 @@ describe('Toolbar actions - multiple selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for selected files`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for selected files`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for selected files`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); + expect(await toolbar.menu.isToggleFavoritePresent()).toBe(true, `Favorite is not displayed for selected files`); expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed`); diff --git a/e2e/suites/actions/toolbar-single-selection.test.ts b/e2e/suites/actions/toolbar-single-selection.test.ts index e61fa2cb4d..90ad9888a3 100755 --- a/e2e/suites/actions/toolbar-single-selection.test.ts +++ b/e2e/suites/actions/toolbar-single-selection.test.ts @@ -149,7 +149,7 @@ describe('Toolbar actions - single selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileUser}`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileUser}`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for ${fileUser}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileUser}`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileUser}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed for ${fileUser}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload New Version is not displayed for ${fileUser}`); @@ -171,7 +171,7 @@ describe('Toolbar actions - single selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileLocked}`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for ${fileLocked}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileLocked}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed for ${fileLocked}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is not displayed for ${fileLocked}`); @@ -193,7 +193,7 @@ describe('Toolbar actions - single selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${folderUser}`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${folderUser}`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for ${folderUser}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${folderUser}`); + expect(await toolbar.menu.isRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${folderUser}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed for ${folderUser}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for ${folderUser}`); @@ -309,7 +309,7 @@ describe('Toolbar actions - single selection : ', () => { await toolbar.openMoreMenu(); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${siteName}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${siteName}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${siteName}`); await toolbar.closeMoreMenu(); }); @@ -325,7 +325,7 @@ describe('Toolbar actions - single selection : ', () => { await toolbar.openMoreMenu(); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${siteName}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${siteName}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${siteName}`); await toolbar.closeMoreMenu(); }); @@ -341,7 +341,7 @@ describe('Toolbar actions - single selection : ', () => { await toolbar.openMoreMenu(); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${adminPublic}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${adminPublic}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${adminPublic}`); await toolbar.closeMoreMenu(); }); @@ -357,7 +357,7 @@ describe('Toolbar actions - single selection : ', () => { await toolbar.openMoreMenu(); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${adminModerated}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${adminModerated}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${adminModerated}`); await toolbar.closeMoreMenu(); }); @@ -375,7 +375,7 @@ describe('Toolbar actions - single selection : ', () => { await toolbar.openMoreMenu(); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${siteName}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${siteName}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${siteName}`); await toolbar.closeMoreMenu(); }); @@ -393,7 +393,7 @@ describe('Toolbar actions - single selection : ', () => { await toolbar.openMoreMenu(); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${adminPublic}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${adminPublic}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${adminPublic}`); await toolbar.closeMoreMenu(); }); @@ -411,7 +411,7 @@ describe('Toolbar actions - single selection : ', () => { await toolbar.openMoreMenu(); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${adminModerated}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${adminModerated}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${adminModerated}`); await toolbar.closeMoreMenu(); }); @@ -450,7 +450,7 @@ describe('Toolbar actions - single selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileUser}`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileUser}`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for ${fileUser}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileUser}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileUser}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed for ${fileUser}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is not displayed for ${fileUser}`); @@ -474,7 +474,7 @@ describe('Toolbar actions - single selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileLocked}`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for ${fileLocked}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileLocked}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed for ${fileLocked}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is not displayed for ${fileLocked}`); @@ -513,7 +513,7 @@ describe('Toolbar actions - single selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileUser}`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileUser}`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for ${fileUser}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileUser}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileUser}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed for ${fileUser}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is not displayed for ${fileUser}`); @@ -535,7 +535,7 @@ describe('Toolbar actions - single selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileLocked}`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for ${fileLocked}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileLocked}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed for ${fileLocked}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is not displayed for ${fileLocked}`); @@ -575,7 +575,7 @@ describe('Toolbar actions - single selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileUser}`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileUser}`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for ${fileUser}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileUser}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileUser}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed for ${fileUser}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is not displayed for ${fileUser}`); @@ -598,7 +598,7 @@ describe('Toolbar actions - single selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${fileLocked}`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for ${fileLocked}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileLocked}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed for ${fileLocked}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is not displayed for ${fileLocked}`); @@ -620,7 +620,7 @@ describe('Toolbar actions - single selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${folderUser}`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed for ${folderUser}`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed for ${folderUser}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${folderUser}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${folderUser}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed for ${folderUser}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for ${folderUser}`); @@ -700,7 +700,7 @@ describe('Toolbar actions - single selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileUser}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${fileUser}`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${fileUser}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileUser}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileUser}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed for ${fileUser}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is not displayed for ${fileUser}`); @@ -725,7 +725,7 @@ describe('Toolbar actions - single selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${fileLocked}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${fileLocked}`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${fileLocked}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${fileLocked}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${fileLocked}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(true, `Manage versions is not displayed for ${fileLocked}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(true, `Upload new version is not displayed for ${fileLocked}`); @@ -750,7 +750,7 @@ describe('Toolbar actions - single selection : ', () => { expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed for ${folderUser}`); expect(await toolbar.menu.isDeletePresent()).toBe(false, `Delete is displayed for ${folderUser}`); expect(await toolbar.menu.isMovePresent()).toBe(false, `Move is displayed for ${folderUser}`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed for ${folderUser}`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed for ${folderUser}`); expect(await toolbar.menu.isManageVersionsPresent()).toBe(false, `Manage versions is displayed for ${folderUser}`); expect(await toolbar.menu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for ${folderUser}`); diff --git a/e2e/suites/viewer/viewer-actions.test.ts b/e2e/suites/viewer/viewer-actions.test.ts index 2355cabe0d..1d30938ee2 100755 --- a/e2e/suites/viewer/viewer-actions.test.ts +++ b/e2e/suites/viewer/viewer-actions.test.ts @@ -619,7 +619,7 @@ describe('Viewer actions', () => { expect(await toolbar.menu.isEditOfflinePresent()).toBe(true, `Edit offline is not displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await toolbar.menu.isToggleFavoritePresent()).toBe(true, `Favorite is not displayed`); expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed`); @@ -645,7 +645,7 @@ describe('Viewer actions', () => { expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(true, `Cancel editing is not displayed`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await toolbar.menu.isToggleFavoritePresent()).toBe(true, `Favorite is not displayed`); expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed`); @@ -1085,7 +1085,7 @@ describe('Viewer actions', () => { expect(await toolbar.menu.isEditOfflinePresent()).toBe(true, `Edit offline is not displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(false, `Cancel editing is displayed`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed`); @@ -1111,7 +1111,7 @@ describe('Viewer actions', () => { expect(await toolbar.menu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await toolbar.menu.isCancelEditingPresent()).toBe(true, `Cancel editing is not displayed`); - expect(await toolbar.menu.isFavoritePresent()).toBe(true, `Favorite is not displayed`); + expect(await toolbar.menu.isToggleRemoveFavoritePresent()).toBe(true, `Remove favorite is not displayed`); expect(await toolbar.menu.isCopyPresent()).toBe(true, `Copy is not displayed`); expect(await toolbar.menu.isMovePresent()).toBe(true, `Move is not displayed`); expect(await toolbar.menu.isDeletePresent()).toBe(true, `Delete is not displayed`); @@ -1171,7 +1171,7 @@ describe('Viewer actions', () => { await dataTable.doubleClickOnRowByName(xlsxFavorites); expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened'); - await toolbar.clickMoreActionsFavorite(); + await toolbar.clickMoreActionsRemoveFavorite(); await viewer.clickClose(); await page.clickFavoritesAndWait(); expect(await apis.user.favorites.isFavorite(xlsxFileId)).toBe(false, 'Item is still favorite'); diff --git a/e2e/tsconfig.e2e.typecheck.json b/e2e/tsconfig.e2e.typecheck.json new file mode 100644 index 0000000000..6e22a100d4 --- /dev/null +++ b/e2e/tsconfig.e2e.typecheck.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.e2e.json", + "compilerOptions": { + "noEmit": true, + "noUnusedLocals": true + } +} diff --git a/e2e/utilities/repo-client/apis/queries/queries-api.ts b/e2e/utilities/repo-client/apis/queries/queries-api.ts index c181e173bf..e4b51a3460 100755 --- a/e2e/utilities/repo-client/apis/queries/queries-api.ts +++ b/e2e/utilities/repo-client/apis/queries/queries-api.ts @@ -30,7 +30,7 @@ import { QueriesApi as AdfQueriesApi } from '@alfresco/js-api'; export class QueriesApi extends RepoApi { queriesApi = new AdfQueriesApi(this.alfrescoJsApi); - constructor(username?, password?) { + constructor(username?: string, password?: string) { super(username, password); } @@ -51,10 +51,10 @@ export class QueriesApi extends RepoApi { }; await this.apiAuth(); - return this.alfrescoJsApi.core.queriesApi.findNodes(searchTerm, data); + return this.queriesApi.findNodes(searchTerm, data); } - async waitForSites(searchTerm, data) { + async waitForSites(searchTerm: string, data: any) { try { const sites = async () => { const totalItems = (await this.findSites(searchTerm)).list.pagination.totalItems; @@ -71,7 +71,7 @@ export class QueriesApi extends RepoApi { } } - async waitForFilesAndFolders(searchTerm, data) { + async waitForFilesAndFolders(searchTerm: string, data: any) { try { const nodes = async () => { const totalItems = (await this.findNodes(searchTerm)).list.pagination.totalItems; diff --git a/package.json b/package.json index 60ab5e9e84..3279b484f8 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,9 @@ "build.e2e": "npm run build.extensions && npm run build.app -- --prod --configuration=e2e", "test": "ng test app --code-coverage", "test:ci": "npm run build.extensions && ng test adf-office-services-ext --watch=false && ng test app --code-coverage --watch=false", - "lint": "ng lint && npm run spellcheck && npm run format:check", + "lint": "ng lint && npm run spellcheck && npm run format:check && npm run e2e.typecheck", "wd:update": "webdriver-manager update --gecko=false", + "e2e.typecheck": "tsc -p ./e2e/tsconfig.e2e.typecheck.json", "e2e": "npm run wd:update && protractor --baseUrl=http://localhost:4000", "e2e.local": "npm run wd:update && protractor --baseUrl=http://localhost:4200", "wait:app": "wait-on http://localhost:8080 && wait-on http://localhost:4000", diff --git a/projects/adf-office-services-ext/src/lib/aos-extension.service.ts b/projects/adf-office-services-ext/src/lib/aos-extension.service.ts index f3c2416b25..04ff47135a 100644 --- a/projects/adf-office-services-ext/src/lib/aos-extension.service.ts +++ b/projects/adf-office-services-ext/src/lib/aos-extension.service.ts @@ -69,7 +69,9 @@ export class AosEditOnlineService { private triggerEditOnlineAos(node: MinimalNodeEntryEntity): void { const aosHost = this.appConfigService.get('aosHost'); - const url = `${aosHost}/_aos_nodeid/${node.id}/${node.name}`; + const url = `${aosHost}/_aos_nodeid/${node.id}/${encodeURIComponent( + node.name + )}`; const fileExtension = getFileExtension(node.name); const protocolHandler = this.getProtocolForFileExtension(fileExtension); diff --git a/src/app/components/current-user/current-user.component.html b/src/app/components/current-user/current-user.component.html index 0d14487b6d..8a32ab9b5f 100644 --- a/src/app/components/current-user/current-user.component.html +++ b/src/app/components/current-user/current-user.component.html @@ -14,9 +14,11 @@ {{ 'APP.LANGUAGE' | translate }} - + + + diff --git a/src/app/components/current-user/current-user.component.ts b/src/app/components/current-user/current-user.component.ts index f250d3e5c4..7c4ced2d60 100644 --- a/src/app/components/current-user/current-user.component.ts +++ b/src/app/components/current-user/current-user.component.ts @@ -33,6 +33,7 @@ import { import { AppStore } from '../../store/states'; import { ProfileState } from '@alfresco/adf-extensions'; import { SetSelectedNodesAction } from '../../store/actions'; +import { AppService } from '../../services/app.service'; @Component({ selector: 'aca-current-user', @@ -44,7 +45,11 @@ export class CurrentUserComponent { profile$: Observable; languagePicker$: Observable; - constructor(private store: Store) { + get showLogout(): boolean { + return !this.appService.withCredentials; + } + + constructor(private store: Store, private appService: AppService) { this.profile$ = this.store.select(selectUser); this.languagePicker$ = store.select(appLanguagePicker); } diff --git a/src/app/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.ts b/src/app/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.ts index e586cae1d7..478d3f7991 100644 --- a/src/app/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.ts +++ b/src/app/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.ts @@ -44,12 +44,16 @@ import { Router } from '@angular/router'; [attr.title]=" favoriteLibrary.isFavorite() ? ('APP.ACTIONS.REMOVE_FAVORITE' | translate) - : ('APP.ACTIONS.ADD_FAVORITE' | translate) + : ('APP.ACTIONS.FAVORITE' | translate) " > star star_border - {{ 'APP.ACTIONS.FAVORITE' | translate }} + {{ + (favoriteLibrary.isFavorite() + ? 'APP.ACTIONS.REMOVE_FAVORITE' + : 'APP.ACTIONS.FAVORITE') | translate + }} `, encapsulation: ViewEncapsulation.None, diff --git a/src/app/components/toolbar/toggle-favorite/toggle-favorite.component.ts b/src/app/components/toolbar/toggle-favorite/toggle-favorite.component.ts index dbf7704884..d3e72e646c 100644 --- a/src/app/components/toolbar/toggle-favorite/toggle-favorite.component.ts +++ b/src/app/components/toolbar/toggle-favorite/toggle-favorite.component.ts @@ -42,7 +42,11 @@ import { ReloadDocumentListAction } from '../../../store/actions'; > star star_border - {{ 'APP.ACTIONS.FAVORITE' | translate }} + {{ + (favorites.hasFavorites() + ? 'APP.ACTIONS.REMOVE_FAVORITE' + : 'APP.ACTIONS.FAVORITE') | translate + }} `, encapsulation: ViewEncapsulation.None, diff --git a/src/assets/app.extensions.json b/src/assets/app.extensions.json index e67a8c37ba..1b7ba5ebed 100644 --- a/src/assets/app.extensions.json +++ b/src/assets/app.extensions.json @@ -612,7 +612,7 @@ { "id": "app.toolbar.favorite.remove", "order": 403, - "title": "APP.ACTIONS.FAVORITE", + "title": "APP.ACTIONS.REMOVE_FAVORITE", "icon": "star", "actions": { "click": "REMOVE_FAVORITE" @@ -792,7 +792,7 @@ }, { "id": "app.context.menu.favorite.remove", - "title": "APP.ACTIONS.FAVORITE", + "title": "APP.ACTIONS.REMOVE_FAVORITE", "order": 701, "icon": "star", "actions": { @@ -1090,7 +1090,7 @@ { "id": "app.viewer.favorite.remove", "order": 401, - "title": "APP.ACTIONS.FAVORITE", + "title": "APP.ACTIONS.REMOVE_FAVORITE", "icon": "star", "actions": { "click": "REMOVE_FAVORITE"