Add automated tests for share files (#3917)

This commit is contained in:
cristinaj 2018-10-25 12:22:08 +03:00 committed by Eugenio Romano
parent 72dab2400a
commit 021fc4218c

View File

@ -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();