[ACA-2062] toolbar updates (#847)

* john-doclist-actions-ACA-2062

* add “simpletask” to ignore list

* fix e2e

* add workaround for Favorites

* isSharedFile state evaluator

* update docs

* update store on share file modal closed

* share action definition

* rename evaluator

* context menu rule

* check for file selection

* use another selector

* update tests

* viewer share action

* fix e2e tests

* update viewer button ids
This commit is contained in:
john-knowles
2018-12-05 11:27:22 +00:00
committed by Denys Vuika
parent 8d64dfb0e8
commit 12a72afdac
14 changed files with 353 additions and 225 deletions
@@ -274,8 +274,7 @@ describe('Context menu actions - single selection : ', () => {
expect(await contextMenu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for ${fileUser}`);
expect(await contextMenu.isMenuItemPresent('Move')).toBe(true, `Move is not displayed for ${fileUser}`);
expect(await contextMenu.isMenuItemPresent('Delete')).toBe(true, `Delete is not displayed for ${fileUser}`);
// TODO: enable this when the action is properly implemented: ACA-92
// expect(await contextMenu.isMenuItemPresent('Share')).toBe(true, `Share is not displayed for ${fileUser}`);
expect(await contextMenu.isMenuItemPresent('Shared link settings')).toBe(true, `Shared link settings is not displayed for ${fileUser}`);
expect(await contextMenu.isMenuItemPresent('Manage Versions')).toBe(true, `Manage Versions not displayed for ${fileUser}`);
expect(await contextMenu.isMenuItemPresent('Permissions')).toBe(true, `Permissions is not displayed for ${fileUser}`);
expect(await contextMenu.isMenuItemPresent('Edit')).toBe(false, `Edit is displayed for ${fileUser}`);
+47 -90
View File
@@ -120,8 +120,7 @@ describe('Share a file', () => {
it('Share dialog default values - [C286327]', async () => {
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.getTitle()).toEqual(`Share ${file1}`);
@@ -137,8 +136,7 @@ describe('Share a file', () => {
it('Close dialog - [C286328]', async () => {
await dataTable.selectItem(file2);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.closeButton.isEnabled()).toBe(true, 'Close button is not enabled');
@@ -148,8 +146,7 @@ describe('Share a file', () => {
it('Share a file - [C286329]', async () => {
await dataTable.selectItem(file3);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
@@ -165,8 +162,7 @@ describe('Share a file', () => {
it('Copy shared file URL - [C286330]', async () => {
await dataTable.selectItem(file4);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
expect(url).toContain('/preview/s/');
@@ -183,8 +179,7 @@ describe('Share a file', () => {
it('Share a file with expiration date - [C286332]', async () => {
await dataTable.selectItem(file5);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
await shareDialog.clickExpirationToggle();
@@ -205,8 +200,7 @@ describe('Share a file', () => {
it('Expire date is displayed correctly - [C286337]', async () => {
await dataTable.selectItem(file6);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const expireProperty = await apis.user.nodes.getNodeProperty(file6Id, 'qshare:expiryDate');
@@ -217,8 +211,7 @@ describe('Share a file', () => {
it('Disable the share link expiration - [C286333]', async () => {
await dataTable.selectItem(file7);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isExpireToggleEnabled()).toBe(true, 'Expiration is not checked');
@@ -234,8 +227,7 @@ describe('Share a file', () => {
it('Shared file URL is not changed when Share dialog is closed and opened again - [C286335]', async () => {
await dataTable.selectItem(file8);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const url1 = await shareDialog.getLinkUrl();
await shareDialog.clickClose();
@@ -243,8 +235,7 @@ describe('Share a file', () => {
await page.dataTable.clearSelection();
await dataTable.selectItem(file8);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const url2 = await shareDialog.getLinkUrl();
@@ -253,7 +244,7 @@ describe('Share a file', () => {
it('Share a file from the context menu - [C286345]', async () => {
await dataTable.rightClickOnItem(file9);
await contextMenu.clickMenuItem('Share');
await contextMenu.clickShareAction();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
@@ -325,8 +316,7 @@ describe('Share a file', () => {
it('Share dialog default values - [C286639]', async () => {
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.getTitle()).toEqual(`Share ${file1}`);
@@ -342,8 +332,7 @@ describe('Share a file', () => {
it('Close dialog - [C286640]', async () => {
await dataTable.selectItem(file2);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.closeButton.isEnabled()).toBe(true, 'Close button is not enabled');
@@ -353,8 +342,7 @@ describe('Share a file', () => {
it('Share a file - [C286641]', async () => {
await dataTable.selectItem(file3);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
@@ -370,8 +358,7 @@ describe('Share a file', () => {
it('Copy shared file URL - [C286642]', async () => {
await dataTable.selectItem(file4);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
expect(url).toContain('/preview/s/');
@@ -388,8 +375,7 @@ describe('Share a file', () => {
it('Share a file with expiration date - [C286643]', async () => {
await dataTable.selectItem(file5);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
await shareDialog.clickExpirationToggle();
@@ -410,8 +396,7 @@ describe('Share a file', () => {
it('Expire date is displayed correctly - [C286644]', async () => {
await dataTable.selectItem(file6);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const expireProperty = await apis.user.nodes.getNodeProperty(file6Id, 'qshare:expiryDate');
@@ -422,8 +407,7 @@ describe('Share a file', () => {
it('Disable the share link expiration - [C286645]', async () => {
await dataTable.selectItem(file7);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isExpireToggleEnabled()).toBe(true, 'Expiration is not checked');
@@ -439,8 +423,7 @@ describe('Share a file', () => {
it('Shared file URL is not changed when Share dialog is closed and opened again - [C286646]', async () => {
await dataTable.selectItem(file8);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const url1 = await shareDialog.getLinkUrl();
await shareDialog.clickClose();
@@ -448,8 +431,7 @@ describe('Share a file', () => {
await page.dataTable.clearSelection();
await dataTable.selectItem(file8);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const url2 = await shareDialog.getLinkUrl();
@@ -458,7 +440,7 @@ describe('Share a file', () => {
it('Share a file from the context menu - [C286647]', async () => {
await dataTable.rightClickOnItem(file9);
await contextMenu.clickMenuItem('Share');
await contextMenu.clickShareAction();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
@@ -528,8 +510,7 @@ describe('Share a file', () => {
it('Share dialog default values - [C286657]', async () => {
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.getTitle()).toEqual(`Share ${file1}`);
@@ -545,8 +526,7 @@ describe('Share a file', () => {
it('Close dialog - [C286658]', async () => {
await dataTable.selectItem(file2);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.closeButton.isEnabled()).toBe(true, 'Close button is not enabled');
@@ -556,8 +536,7 @@ describe('Share a file', () => {
it('Share a file - [C286659]', async () => {
await dataTable.selectItem(file3);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
@@ -573,8 +552,7 @@ describe('Share a file', () => {
it('Copy shared file URL - [C286660]', async () => {
await dataTable.selectItem(file4);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
expect(url).toContain('/preview/s/');
@@ -591,8 +569,7 @@ describe('Share a file', () => {
it('Share a file with expiration date - [C286661]', async () => {
await dataTable.selectItem(file5);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
await shareDialog.clickExpirationToggle();
@@ -613,8 +590,7 @@ describe('Share a file', () => {
it('Expire date is displayed correctly - [C286662]', async () => {
await dataTable.selectItem(file6);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const expireProperty = await apis.user.nodes.getNodeProperty(file6Id, 'qshare:expiryDate');
@@ -625,8 +601,7 @@ describe('Share a file', () => {
it('Disable the share link expiration - [C286663]', async () => {
await dataTable.selectItem(file7);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isExpireToggleEnabled()).toBe(true, 'Expiration is not checked');
@@ -642,8 +617,7 @@ describe('Share a file', () => {
it('Shared file URL is not changed when Share dialog is closed and opened again - [C286664]', async () => {
await dataTable.selectItem(file8);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const url1 = await shareDialog.getLinkUrl();
await shareDialog.clickClose();
@@ -651,8 +625,7 @@ describe('Share a file', () => {
await page.dataTable.clearSelection();
await dataTable.selectItem(file8);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const url2 = await shareDialog.getLinkUrl();
@@ -661,7 +634,7 @@ describe('Share a file', () => {
it('Share a file from the context menu - [C286665]', async () => {
await dataTable.rightClickOnItem(file9);
await contextMenu.clickMenuItem('Share');
await contextMenu.clickShareAction();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
@@ -731,8 +704,7 @@ describe('Share a file', () => {
it('Share dialog default values - [C286648]', async () => {
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.getTitle()).toEqual(`Share ${file1}`);
@@ -748,8 +720,7 @@ describe('Share a file', () => {
it('Close dialog - [C286649]', async () => {
await dataTable.selectItem(file2);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.closeButton.isEnabled()).toBe(true, 'Close button is not enabled');
@@ -759,8 +730,7 @@ describe('Share a file', () => {
it('Copy shared file URL - [C286651]', async () => {
await dataTable.selectItem(file3);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
expect(url).toContain('/preview/s/');
@@ -777,8 +747,7 @@ describe('Share a file', () => {
it('Expire date is displayed correctly - [C286653]', async () => {
await dataTable.selectItem(file4);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const expireProperty = await apis.user.nodes.getNodeProperty(file4Id, 'qshare:expiryDate');
@@ -789,8 +758,7 @@ describe('Share a file', () => {
it('Disable the share link expiration - [C286654]', async () => {
await dataTable.selectItem(file5);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isExpireToggleEnabled()).toBe(true, 'Expiration is not checked');
@@ -806,8 +774,7 @@ describe('Share a file', () => {
it('Shared file URL is not changed when Share dialog is closed and opened again - [C286655]', async () => {
await dataTable.selectItem(file6);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const url1 = await shareDialog.getLinkUrl();
await shareDialog.clickClose();
@@ -815,8 +782,7 @@ describe('Share a file', () => {
await page.dataTable.clearSelection();
await dataTable.selectItem(file6);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const url2 = await shareDialog.getLinkUrl();
@@ -825,7 +791,7 @@ describe('Share a file', () => {
it('Open Share dialog from context menu - [C286656]', async () => {
await dataTable.rightClickOnItem(file7);
await contextMenu.clickMenuItem('Shared link settings');
await contextMenu.clickShareEditAction();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.getTitle()).toEqual(`Share ${file7}`);
@@ -907,8 +873,7 @@ describe('Share a file', () => {
it('Share dialog default values - [C286666]', async () => {
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.getTitle()).toEqual(`Share ${file1}`);
@@ -924,8 +889,7 @@ describe('Share a file', () => {
it('Close dialog - [C286667]', async () => {
await dataTable.selectItem(file2);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.closeButton.isEnabled()).toBe(true, 'Close button is not enabled');
@@ -935,8 +899,7 @@ describe('Share a file', () => {
it('Share a file - [C286668]', async () => {
await dataTable.selectItem(file3);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
@@ -952,8 +915,7 @@ describe('Share a file', () => {
it('Copy shared file URL - [C286669]', async () => {
await dataTable.selectItem(file4);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
expect(url).toContain('/preview/s/');
@@ -970,8 +932,7 @@ describe('Share a file', () => {
it('Share a file with expiration date - [C286670]', async () => {
await dataTable.selectItem(file5);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
await shareDialog.clickExpirationToggle();
@@ -992,8 +953,7 @@ describe('Share a file', () => {
it('Expire date is displayed correctly - [C286671]', async () => {
await dataTable.selectItem(file6);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const expireProperty = await apis.user.nodes.getNodeProperty(file6Id, 'qshare:expiryDate');
@@ -1004,8 +964,7 @@ describe('Share a file', () => {
it('Disable the share link expiration - [C286672]', async () => {
await dataTable.selectItem(file7);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isExpireToggleEnabled()).toBe(true, 'Expiration is not checked');
@@ -1021,8 +980,7 @@ describe('Share a file', () => {
it('Shared file URL is not changed when Share dialog is closed and opened again - [C286673]', async () => {
await dataTable.selectItem(file8);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const url1 = await shareDialog.getLinkUrl();
await shareDialog.clickClose();
@@ -1030,8 +988,7 @@ describe('Share a file', () => {
await page.dataTable.clearSelection();
await dataTable.selectItem(file8);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const url2 = await shareDialog.getLinkUrl();
@@ -629,10 +629,11 @@ describe('Granular permissions available actions : ', () => {
expect(await viewerToolbar.isButtonPresent('Download')).toBe(true, `Download is not displayed`);
expect(await viewerToolbar.isButtonPresent('Print')).toBe(true, `Print is not displayed`);
expect(await viewerToolbar.isButtonPresent('Activate full-screen mode')).toBe(true, `Full screen is not displayed`);
expect(await viewerToolbar.isShareEditButtonPresent()).toBe(true, 'Shared link settings is not displayed');
expect(await viewerToolbar.isButtonPresent('View details')).toBe(true, `View details is not displayed`);
await viewerToolbar.openMoreMenu();
expect(await viewerToolbar.menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed`);
expect(await viewerToolbar.menu.isMenuItemPresent('Share')).toBe(true, `Share is not displayed`);
expect(await viewerToolbar.menu.isMenuItemPresent('Share')).toBe(false, `Share is displayed in More actions`);
expect(await viewerToolbar.menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed`);
expect(await viewerToolbar.menu.isMenuItemPresent('Move')).toBe(false, `Move is displayed`);
expect(await viewerToolbar.menu.isMenuItemPresent('Delete')).toBe(false, `Delete is displayed`);
@@ -672,10 +673,11 @@ describe('Granular permissions available actions : ', () => {
expect(await viewerToolbar.isButtonPresent('Download')).toBe(true, `Download is not displayed`);
expect(await viewerToolbar.isButtonPresent('Print')).toBe(true, `Print is not displayed`);
expect(await viewerToolbar.isButtonPresent('Activate full-screen mode')).toBe(true, `Full screen is not displayed`);
expect(await viewerToolbar.isShareEditButtonPresent()).toBe(true, 'Shared link settings is not displayed');
expect(await viewerToolbar.isButtonPresent('View details')).toBe(true, `View details is not displayed`);
await viewerToolbar.openMoreMenu();
expect(await viewerToolbar.menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed`);
expect(await viewerToolbar.menu.isMenuItemPresent('Share')).toBe(true, `Share is not displayed`);
expect(await viewerToolbar.menu.isMenuItemPresent('Share')).toBe(false, `Share is displayed in More actions`);
expect(await viewerToolbar.menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed`);
// TODO: enable when ACA-1737 is done
// expect(await viewerToolbar.menu.isMenuItemPresent('Move')).toBe(false, `Move is displayed`);
@@ -267,8 +267,8 @@ describe('Toolbar actions - single selection : ', () => {
expect(await toolbar.isButtonPresent('View')).toBe(true, `View is not displayed for ${fileUser}`);
expect(await toolbar.isButtonPresent('Download')).toBe(true, `Download is not displayed for ${fileUser}`);
expect(await toolbar.isButtonPresent('Edit')).toBe(false, `Edit is displayed for ${fileUser}`);
expect(await toolbar.isShareEditButtonPresent()).toBe(true, `Shared link settings is not displayed for ${fileUser}`);
await toolbar.openMoreMenu();
expect(await toolbar.menu.isMenuItemPresent('Shared link settings')).toBe(true, `Shared is not displayed for ${fileUser}`);
expect(await toolbar.menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for ${fileUser}`);
expect(await toolbar.menu.isMenuItemPresent('Delete')).toBe(true, `Delete is not displayed for ${fileUser}`);
expect(await toolbar.menu.isMenuItemPresent('Move')).toBe(true, `Move is not displayed for ${fileUser}`);
+38 -47
View File
@@ -106,8 +106,7 @@ describe('Unshare a file', () => {
it('Unshare dialog UI - [C286339]', async () => {
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isShareToggleChecked()).toBe(true, 'Share toggle not checked');
@@ -122,8 +121,7 @@ describe('Unshare a file', () => {
it('Unshare a file - [C286340]', async () => {
await dataTable.selectItem(file2);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
await shareDialog.clickShareToggle();
@@ -147,8 +145,7 @@ describe('Unshare a file', () => {
it('Cancel the Unshare action - [C286341]', async () => {
await dataTable.selectItem(file3);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const urlBefore = await shareDialog.getLinkUrl();
@@ -165,7 +162,7 @@ describe('Unshare a file', () => {
it('Unshare a file from the context menu - [C286359]', async () => {
await dataTable.rightClickOnItem(file4);
await contextMenu.clickMenuItem('Shared link settings');
await contextMenu.clickShareEditAction();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
await shareDialog.clickShareToggle();
@@ -238,8 +235,7 @@ describe('Unshare a file', () => {
it('Unshare dialog UI - [C286679]', async () => {
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isShareToggleChecked()).toBe(true, 'Share toggle not checked');
@@ -254,8 +250,7 @@ describe('Unshare a file', () => {
it('Unshare a file - [C286680]', async () => {
await dataTable.selectItem(file2);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
await shareDialog.clickShareToggle();
@@ -279,8 +274,7 @@ describe('Unshare a file', () => {
it('Cancel the Unshare action - [C286681]', async () => {
await dataTable.selectItem(file3);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const urlBefore = await shareDialog.getLinkUrl();
@@ -297,7 +291,7 @@ describe('Unshare a file', () => {
it('Unshare a file from the context menu - [C286683]', async () => {
await dataTable.rightClickOnItem(file4);
await contextMenu.clickMenuItem('Shared link settings');
await contextMenu.clickShareEditAction();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
await shareDialog.clickShareToggle();
@@ -362,8 +356,7 @@ describe('Unshare a file', () => {
it('Unshare dialog UI - [C286689]', async () => {
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isShareToggleChecked()).toBe(true, 'Share toggle not checked');
@@ -378,8 +371,7 @@ describe('Unshare a file', () => {
it('Unshare a file - [C286690]', async () => {
await dataTable.selectItem(file2);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
await shareDialog.clickShareToggle();
@@ -403,8 +395,7 @@ describe('Unshare a file', () => {
it('Cancel the Unshare action - [C286691]', async () => {
await dataTable.selectItem(file3);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const urlBefore = await shareDialog.getLinkUrl();
@@ -421,7 +412,7 @@ describe('Unshare a file', () => {
it('Unshare a file from the context menu - [C286693]', async () => {
await dataTable.rightClickOnItem(file4);
await contextMenu.clickMenuItem('Shared link settings');
await contextMenu.clickShareEditAction();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
await shareDialog.clickShareToggle();
@@ -486,8 +477,7 @@ describe('Unshare a file', () => {
it('Unshare dialog UI - [C286684]', async () => {
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isShareToggleChecked()).toBe(true, 'Share toggle not checked');
@@ -502,8 +492,7 @@ describe('Unshare a file', () => {
it('Unshare a file - [C286685]', async () => {
await dataTable.selectItem(file2);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
await shareDialog.clickShareToggle();
@@ -526,8 +515,7 @@ describe('Unshare a file', () => {
it('Cancel the Unshare action - [C286686]', async () => {
await dataTable.selectItem(file3);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
const urlBefore = await shareDialog.getLinkUrl();
@@ -544,7 +532,7 @@ describe('Unshare a file', () => {
it('Unshare a file from the context menu - [C286688]', async () => {
await dataTable.rightClickOnItem(file4);
await contextMenu.clickMenuItem('Shared link settings');
await contextMenu.clickShareEditAction();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
await shareDialog.clickShareToggle();
@@ -615,8 +603,9 @@ describe('Unshare a file', () => {
it('Unshare dialog UI - [C286694]', async () => {
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
// TODO: remove workaround for favorites
// await toolbar.clickShareEditButton();
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isShareToggleChecked()).toBe(true, 'Share toggle not checked');
@@ -631,8 +620,9 @@ describe('Unshare a file', () => {
it('Unshare a file - [C286695]', async () => {
await dataTable.selectItem(file2);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
// TODO: remove workaround for favorites
// await toolbar.clickShareEditButton();
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
await shareDialog.clickShareToggle();
@@ -656,8 +646,9 @@ describe('Unshare a file', () => {
it('Cancel the Unshare action - [C286696]', async () => {
await dataTable.selectItem(file3);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
// TODO: remove workaround for favorites
// await toolbar.clickShareEditButton();
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
const urlBefore = await shareDialog.getLinkUrl();
@@ -674,7 +665,9 @@ describe('Unshare a file', () => {
it('Unshare a file from the context menu - [C286698]', async () => {
await dataTable.rightClickOnItem(file4);
await contextMenu.clickMenuItem('Share');
// TODO: remove workaround for favorites
// await toolbar.clickShareEditButton();
await contextMenu.clickShareAction();
await shareDialog.waitForDialogToOpen();
const url = await shareDialog.getLinkUrl();
await shareDialog.clickShareToggle();
@@ -744,8 +737,7 @@ describe('Unshare a file', () => {
await dataTable.doubleClickOnRowByName(sitePrivate);
await dataTable.waitForHeader();
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isShareToggleDisabled()).toBe(false, 'Share toggle enabled for consumer');
@@ -756,8 +748,7 @@ describe('Unshare a file', () => {
await dataTable.doubleClickOnRowByName(sitePrivate);
await dataTable.waitForHeader();
await dataTable.selectItem(file2);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isShareToggleDisabled()).toBe(false, 'Share toggle enabled for consumer');
@@ -766,8 +757,7 @@ describe('Unshare a file', () => {
it('on Shared Files - file shared by other user - [C286687]', async () => {
await page.clickSharedFilesAndWait();
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isShareToggleDisabled()).toBe(false, 'Share toggle enabled for consumer');
@@ -776,8 +766,7 @@ describe('Unshare a file', () => {
it('on Shared Files - file shared by the user - [C286702]', async () => {
await page.clickSharedFilesAndWait();
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Shared link settings');
await toolbar.clickShareEditButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isShareToggleDisabled()).toBe(false, 'Share toggle enabled for consumer');
@@ -786,8 +775,9 @@ describe('Unshare a file', () => {
it('on Favorites - file shared by other user - [C286697]', async () => {
await page.clickFavoritesAndWait();
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
// TODO: remove workaround for favorites
// await toolbar.clickShareEditButton();
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isShareToggleDisabled()).toBe(false, 'Share toggle enabled for consumer');
@@ -796,8 +786,9 @@ describe('Unshare a file', () => {
it('on Favorites - file shared by the user - [C286703]', async () => {
await page.clickFavoritesAndWait();
await dataTable.selectItem(file1);
await toolbar.openMoreMenu();
await toolbar.menu.clickMenuItem('Share');
// TODO: remove workaround for favorites
// await toolbar.clickShareEditButton();
await toolbar.clickShareButton();
await shareDialog.waitForDialogToOpen();
expect(await shareDialog.isShareToggleDisabled()).toBe(false, 'Share toggle enabled for consumer');