mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ADF-4424] Pdf Viewer - password dialog does not close when pressing Escape (#4622)
* return to previous page on close * update e2e * [ADF-4424] Improve PreviousRouteService to use it in pdfViewer * change previous Url logic * remove navigation logic * remove test * Update pdfViewer.component.spec.ts * back button logic for viewer outlet * unit tests * remove fdescribe * remove unused service * e2e * return to location * remove click filter step * remove unnecessary test steps * remove un existen export * unify preview between PS and CS in demo shell * fix dispalyname property
This commit is contained in:
committed by
Eugenio Romano
parent
72b3a75a85
commit
ccdcba8778
@@ -401,4 +401,11 @@ describe('Content Services Viewer', () => {
|
||||
|
||||
viewerPage.clickCloseButton();
|
||||
});
|
||||
|
||||
it('[C307985] Should close the viewer when password dialog is cancelled', () => {
|
||||
viewerPage.viewFile(protectedFile.name);
|
||||
viewerPage.checkPasswordDialogIsDisplayed();
|
||||
viewerPage.clickClosePasswordDialog();
|
||||
contentServicesPage.checkContentIsDisplayed(protectedFile.name);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -50,6 +50,7 @@ export class ViewerPage {
|
||||
lastThumbnailDisplayed = element.all(by.css('adf-pdf-thumb')).last();
|
||||
passwordDialog = element(by.css('adf-pdf-viewer-password-dialog'));
|
||||
passwordSubmit = element(by.css('button[data-automation-id="adf-password-dialog-submit"]'));
|
||||
passwordDialogClose = element(by.css('button[data-automation-id="adf-password-dialog-close"]'));
|
||||
passwordSubmitDisabled = element(by.css('button[data-automation-id="adf-password-dialog-submit"][disabled]'));
|
||||
passwordInput = element(by.css('input[data-automation-id="adf-password-dialog-input"]'));
|
||||
passwordError = element(by.css('mat-error[data-automation-id="adf-password-dialog-error"]'));
|
||||
@@ -149,6 +150,11 @@ export class ViewerPage {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.pdfPageLoaded, 30000, `not loaded ${fileName}`);
|
||||
}
|
||||
|
||||
clickClosePasswordDialog() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.passwordDialogClose);
|
||||
this.passwordDialogClose.click();
|
||||
}
|
||||
|
||||
checkImgViewerIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsOnPage(this.imgViewer);
|
||||
}
|
||||
|
||||
@@ -101,15 +101,11 @@ describe('Attachment list action menu for tasks', () => {
|
||||
viewerPage.checkFileNameIsDisplayed(pngFile.name);
|
||||
viewerPage.clickCloseButton();
|
||||
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
|
||||
attachmentListPage.doubleClickFile(pngFile.name);
|
||||
|
||||
viewerPage.checkFileNameIsDisplayed(pngFile.name);
|
||||
viewerPage.clickCloseButton();
|
||||
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
|
||||
attachmentListPage.downloadFile(pngFile.name);
|
||||
|
||||
browser.driver.sleep(1000);
|
||||
@@ -139,9 +135,6 @@ describe('Attachment list action menu for tasks', () => {
|
||||
viewerPage.checkFileNameIsDisplayed(pngFile.name);
|
||||
viewerPage.clickCloseButton();
|
||||
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.COMPLETED_TASKS);
|
||||
taskPage.tasksListPage().selectRow(taskName.completed);
|
||||
|
||||
attachmentListPage.downloadFile(pngFile.name);
|
||||
|
||||
browser.driver.sleep(1000);
|
||||
|
||||
Reference in New Issue
Block a user