[AAE-1880] e2e document-list selection mode (#5518)

* [AAE-1880] e2e document-list selection mode, open file/folder

* resolved comments: backtick, refactoring names, using dropdownPage, removing comments, wrapping the API

* added a new try-catch for beforeAll, fixed the error message

* changed the name of a method from clickDropdownWithOption to selectDropdownOption

* changed the method name from clickDropdown... to selectDropdownOption

* added the variable type for some methods, delete the let list and refactor accordingly
This commit is contained in:
Alexandra Abrudan
2020-03-03 18:50:36 +00:00
committed by GitHub
parent 2b1a321baf
commit 24c728a8f5
9 changed files with 252 additions and 78 deletions

View File

@@ -499,10 +499,6 @@ export class ViewerPage {
await this.formControllersPage.enableToggle(this.showTabWithIconAndLabelSwitch);
}
async checkDownloadButtonDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.downloadButton);
}
async checkDownloadButtonIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.downloadButton);
}
@@ -544,6 +540,16 @@ export class ViewerPage {
await BrowserVisibility.waitUntilElementIsNotVisible(this.uploadButton);
}
async checkPreviewFileDefaultOptionsAreDisplayed(): Promise<void> {
await this.checkToolbarIsDisplayed();
await this.checkMoreActionsDisplayed();
await this.checkPrintButtonIsDisplayed();
await this.checkDownloadButtonIsDisplayed();
await this.checkFullScreenButtonIsDisplayed();
await this.checkLeftSideBarButtonIsDisplayed();
await this.checkInfoButtonIsDisplayed();
}
async disableMoreActions(): Promise<void> {
await this.formControllersPage.disableToggle(this.moreActionsSwitch);
}

View File

@@ -18,35 +18,34 @@
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { by, element, ElementFinder } from 'protractor';
import { BrowserActions } from '../../core/utils/browser-actions';
import { DropdownPage } from '../../material/pages/dropdown.page';
export class SelectAppsDialog {
selectAppsDialog: ElementFinder = element(by.css('mat-dialog-container[aria-labelledby="adf-select-app-dialog-title"]'));
title: ElementFinder = element(by.id('adf-select-app-dialog-title'));
dropdownAppsButton: ElementFinder = element(by.id('adf-select-app-dialog-dropdown'));
appsOption: ElementFinder = element(by.css('.mat-option span'));
appsDropdown = new DropdownPage(element(by.id('adf-select-app-dialog-dropdown')));
continueButton: ElementFinder = element(by.css('adf-select-apps-dialog .mat-button-wrapper'));
async checkSelectAppsDialogIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.selectAppsDialog);
}
async selectApp(appName: string): Promise<void> {
await this.appsDropdown.selectDropdownOption(appName);
}
async getTitle(): Promise<string> {
return BrowserActions.getText(this.title);
}
async clickDropdownAppsButton(): Promise<void> {
await BrowserActions.click(this.dropdownAppsButton);
async clickAppsDropdown(): Promise<void> {
await this.appsDropdown.clickDropdown();
}
async clickContinueButton(): Promise<void> {
await BrowserActions.click(this.continueButton);
}
async clickAppsOption(): Promise<void> {
await BrowserActions.click(this.appsOption);
}
async checkSelectAppsDialogIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.selectAppsDialog);
}