[AAE-1729] Move task-process filters methods into adf-testing, refactor dropdowns to use dropdown material testing page (#5467)

* [AAE-1729] Move task-process filters methods into adf-testing

* [AAE-1729] Add default filters methods in testing package

* [AAE-1729] Refactor testing package and e2e to use Dropdown testing page

* [AAE-1729] Rename function

* [AAE-1729] Fix failing e2e, add click and select dropdown method

* [AAE-1729] Fix e2e

* [AAE-1729] fix e2e

* [AAE-1729] Add default filters methods in testing package

* [AAE-1729] Slow down upload speed, fix cancel upload e2e

* [AAE-1729] Undo slow down upload speed, fix cancel upload e2e
This commit is contained in:
arditdomi
2020-02-27 13:51:36 +00:00
committed by GitHub
parent d2ec8ccee7
commit 14529da097
58 changed files with 601 additions and 650 deletions

View File

@@ -81,13 +81,15 @@ export class ContentServicesPage {
copyContentElement: ElementFinder = element(by.css('button[data-automation-id*="COPY"]'));
lockContentElement: ElementFinder = element(by.css('button[data-automation-id="DOCUMENT_LIST.ACTIONS.LOCK"]'));
downloadContent: ElementFinder = element(by.css('button[data-automation-id*="DOWNLOAD"]'));
siteListDropdown: ElementFinder = element(by.css(`mat-select[data-automation-id='site-my-files-option']`));
downloadButton: ElementFinder = element(by.css('button[title="Download"]'));
favoriteButton: ElementFinder = element(by.css('button[data-automation-id="favorite"]'));
markedFavorite: ElementFinder = element(by.cssContainingText('button[data-automation-id="favorite"] mat-icon', 'star'));
notMarkedFavorite: ElementFinder = element(by.cssContainingText('button[data-automation-id="favorite"] mat-icon', 'star_border'));
multiSelectToggle: ElementFinder = element(by.cssContainingText('span.mat-slide-toggle-content', ' Multiselect (with checkboxes) '));
siteListDropdown = new DropdownPage(element(by.css(`mat-select[data-automation-id='site-my-files-option']`)));
sortingDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="grid-view-sorting"]')));
async pressContextMenuActionNamed(actionName): Promise<void> {
await BrowserActions.clickExecuteScript(`button[data-automation-id="context-${actionName}"]`);
}
@@ -577,11 +579,8 @@ export class ContentServicesPage {
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
}
async selectGridSortingFromDropdown(sortingChosen): Promise<void> {
const sortingDropdown: ElementFinder = element(by.css('mat-select[data-automation-id="grid-view-sorting"]'));
await BrowserActions.click(sortingDropdown);
const optionToClick: ElementFinder = element(by.css(`mat-option[data-automation-id="grid-view-sorting-${sortingChosen}"]`));
await BrowserActions.click(optionToClick);
async selectGridSortingFromDropdown(sortingOption): Promise<void> {
await this.sortingDropdown.clickDropdownWithOption(sortingOption);
}
async checkRowIsDisplayed(rowName): Promise<void> {
@@ -595,13 +594,11 @@ export class ContentServicesPage {
}
async checkSelectedSiteIsDisplayed(siteName): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.siteListDropdown.element(by.cssContainingText('.mat-select-value-text span', siteName)));
await this.siteListDropdown.checkOptionIsSelected(siteName);
}
async selectSite(siteName: string): Promise<void> {
const dropdownPage = new DropdownPage(this.siteListDropdown);
await dropdownPage.clickDropdown();
await dropdownPage.selectOption(siteName);
await this.siteListDropdown.clickDropdownWithOption(siteName);
}
async clickDownloadButton(): Promise<void> {