From 021fc4218c5db1100d35ee5a4dd9d96041d0460e Mon Sep 17 00:00:00 2001 From: cristinaj Date: Thu, 25 Oct 2018 12:22:08 +0300 Subject: [PATCH] Add automated tests for share files (#3917) --- .../share-file/share_file.e2e.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/e2e/content-services/share-file/share_file.e2e.ts b/e2e/content-services/share-file/share_file.e2e.ts index ef9f3dd1ea..7a9494d081 100644 --- a/e2e/content-services/share-file/share_file.e2e.ts +++ b/e2e/content-services/share-file/share_file.e2e.ts @@ -99,6 +99,10 @@ describe('Share file', () => { shareDialog.checkDialogIsDisplayed(); shareDialog.clickShareLinkButton(); shareDialog.checkNotificationWithMessage('Link copied to the clipboard'); + shareDialog.waitForNotificationToClose(); + shareDialog.clickShareLinkButton(); + shareDialog.checkNotificationWithMessage('Link copied to the clipboard'); + }); it('[C286543] Should be possible to close Share dialog', () => { @@ -154,6 +158,24 @@ describe('Share file', () => { viewerPage.checkFileNameIsDisplayed(pngFileModel.name); }); + it('[C287803] Should the URL be kept the same when opening the share dialog multiple times', async () => { + contentListPage.clickRowToSelect(pngFileModel.name); + contentServicesPage.clickShareButton(); + shareDialog.checkDialogIsDisplayed(); + shareDialog.clickShareLinkButton(); + shareDialog.checkNotificationWithMessage('Link copied to the clipboard'); + const sharedLink = await shareDialog.getShareLink(); + shareDialog.clickCloseButton(); + contentServicesPage.clickShareButton(); + shareDialog.checkDialogIsDisplayed(); + shareDialog.clickShareLinkButton(); + shareDialog.checkNotificationWithMessage('Link copied to the clipboard'); + const secondSharedLink = await shareDialog.getShareLink(); + expect(sharedLink).toEqual(secondSharedLink); + browser.get(sharedLink); + viewerPage.checkFileNameIsDisplayed(pngFileModel.name); + }); + it('[C286539] Should open file when non-logged user access shared link', async () => { contentListPage.clickRowToSelect(pngFileModel.name); contentServicesPage.clickShareButton();