[ADF-4640] share dialog fixes (#4830)

* unshare fixes and error notifications

* fix disabled toggles issue

* code fixes and separate interface

* remove 'isFavorite' include

* safety checks for properties

* update e2e

* refactor test after functionality change

* fix issue with the missing properties

* safety checks
This commit is contained in:
Denys Vuika
2019-06-12 17:21:23 +01:00
committed by GitHub
parent 3a2cfb3626
commit f64cd9cffd
7 changed files with 112 additions and 37 deletions

View File

@@ -16,7 +16,7 @@
*/
import CONSTANTS = require('../../util/constants');
import { StringUtil, BrowserActions } from '@alfresco/adf-testing';
import { StringUtil, BrowserActions, NotificationHistoryPage } from '@alfresco/adf-testing';
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
import { LoginPage, ErrorPage } from '@alfresco/adf-testing';
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
@@ -35,6 +35,7 @@ describe('Unshare file', () => {
const contentListPage = contentServicesPage.getDocumentList();
const navBar = new NavigationBarPage();
const errorPage = new ErrorPage();
const notificationHistoryPage = new NotificationHistoryPage();
const shareDialog = new ShareDialog();
const siteName = `PRIVATE-TEST-SITE-${StringUtil.generateRandomString(5)}`;
@@ -171,9 +172,12 @@ describe('Unshare file', () => {
contentServicesPage.clickShareButton();
shareDialog.checkDialogIsDisplayed();
shareDialog.shareToggleButtonIsChecked();
shareDialog.shareToggleButtonIsDisabled();
shareDialog.clickUnShareFile();
shareDialog.confirmationDialogIsNotDisplayed();
shareDialog.confirmationDialogIsDisplayed();
shareDialog.clickConfirmationDialogRemoveButton();
shareDialog.checkDialogIsDisplayed();
shareDialog.shareToggleButtonIsChecked();
notificationHistoryPage.checkNotifyContains(`You don't have permission to unshare this file`);
});
});
});