[AAE-1884] e2e shared file and refactor custom sources (#5506)

* fix lint
e2e shared file and refactor custom sources
additional tests for search chip list (#5523)

* modify wait startegy

* fix metadata problem

* improve method retry

* login before to execute call

* login before to execute call
This commit is contained in:
Eugenio Romano
2020-03-02 10:28:38 +00:00
committed by GitHub
parent 7c849d87f4
commit 7a2af38699
23 changed files with 145 additions and 132 deletions

View File

@@ -612,7 +612,7 @@ export class ContentServicesPage {
}
async selectGridSortingFromDropdown(sortingOption): Promise<void> {
await this.sortingDropdown.clickDropdownWithOption(sortingOption);
await this.sortingDropdown.selectDropdownOption(sortingOption);
}
async checkRowIsDisplayed(rowName): Promise<void> {
@@ -630,7 +630,7 @@ export class ContentServicesPage {
}
async selectSite(siteName: string): Promise<void> {
await this.siteListDropdown.clickDropdownWithOption(siteName);
await this.siteListDropdown.selectDropdownOption(siteName);
}
async clickDownloadButton(): Promise<void> {

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { BrowserActions, BrowserVisibility, DataTableComponentPage } from '@alfresco/adf-testing';
import { BrowserActions, BrowserVisibility, DataTableComponentPage, DropdownPage } from '@alfresco/adf-testing';
import { by, element, ElementFinder } from 'protractor';
import { NavigationBarPage } from '../navigation-bar.page';
@@ -35,17 +35,12 @@ const column = {
status: 'Status'
};
export class CustomSources {
export class CustomSourcesPage {
dataTable: DataTableComponentPage = new DataTableComponentPage();
navigationBarPage: NavigationBarPage = new NavigationBarPage();
toolbar: ElementFinder = element(by.css('app-custom-sources .adf-toolbar-title'));
sourceTypeDropdown: ElementFinder = element(by.css('div[class*="select-arrow"]>div'));
getSourceType(option): ElementFinder {
return element(by.cssContainingText('.cdk-overlay-pane span', `${option}`));
}
selectModeDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="custom-sources-select"]')));
async waitForToolbarToBeVisible(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.toolbar);
@@ -56,18 +51,16 @@ export class CustomSources {
await this.waitForToolbarToBeVisible();
}
async clickOnSourceType(): Promise<void> {
await BrowserActions.click(this.sourceTypeDropdown);
}
async selectMySitesSourceType(): Promise<void> {
await this.clickOnSourceType();
await BrowserActions.click(this.getSourceType(source.mySites));
await this.selectModeDropdown.selectDropdownOption(source.mySites);
}
async selectFavoritesSourceType(): Promise<void> {
await this.clickOnSourceType();
await BrowserActions.click(this.getSourceType(source.favorites));
await this.selectModeDropdown.selectDropdownOption(source.favorites);
}
async selectSharedLinksSourceType(): Promise<void> {
await this.selectModeDropdown.selectDropdownOption(source.sharedLinks);
}
checkRowIsDisplayed(rowName): Promise<void> {

View File

@@ -129,7 +129,7 @@ export class DataTablePage {
}
async selectSelectionMode(selectionMode): Promise<void> {
await this.selectModeDropdown.clickDropdownWithOption(selectionMode);
await this.selectModeDropdown.selectDropdownOption(selectionMode);
}
getRowCheckbox(rowNumber: string): ElementFinder {

View File

@@ -36,11 +36,11 @@ export class ProcessListDemoPage {
}
async selectSorting(sortingOption: string): Promise<void> {
await this.sortDropdown.clickDropdownWithOption(sortingOption);
await this.sortDropdown.selectDropdownOption(sortingOption);
}
async selectStateFilter(stateOption: string): Promise<void> {
await this.stateDropdown.clickDropdownWithOption(stateOption);
await this.stateDropdown.selectDropdownOption(stateOption);
}
async addAppId(appId): Promise<void> {

View File

@@ -139,7 +139,7 @@ export class TaskListDemoPage {
}
async selectState(state): Promise<void> {
await this.stateDropdown.clickDropdownWithOption(state);
await this.stateDropdown.selectDropdownOption(state);
}
getAllProcessDefinitionIds(): Promise<any> {

View File

@@ -66,15 +66,15 @@ export class NotificationPage {
}
async selectHorizontalPosition(selectItem): Promise<void> {
await this.horizontalPositionDropdown.clickDropdownWithOption(selectItem);
await this.horizontalPositionDropdown.selectDropdownOption(selectItem);
}
async selectVerticalPosition(selectItem): Promise<void> {
await this.verticalPositionDropdown.clickDropdownWithOption(selectItem);
await this.verticalPositionDropdown.selectDropdownOption(selectItem);
}
async selectDirection(selectItem): Promise<void> {
await this.directionDropdown.clickDropdownWithOption(selectItem);
await this.directionDropdown.selectDropdownOption(selectItem);
}
async clickNotificationButton(): Promise<void> {

View File

@@ -58,7 +58,7 @@ export class AttachFormPage {
}
async selectAttachFormOption(option): Promise<void> {
await this.attachFormDropdown.clickDropdownWithOption(option);
await this.attachFormDropdown.selectDropdownOption(option);
}
async clickCancelButton(): Promise<void> {

View File

@@ -63,7 +63,7 @@ export class StartTaskDialogPage {
}
async selectForm(form): Promise<void> {
await this.selectFormDropdown.clickDropdownWithOption(form);
await this.selectFormDropdown.selectDropdownOption(form);
}
async clickStartButton(): Promise<void> {

View File

@@ -113,7 +113,7 @@ export class TaskDetailsPage {
}
async selectAttachFormOption(option): Promise<void> {
await this.attachFormDropdown.clickDropdownWithOption(option);
await this.attachFormDropdown.selectDropdownOption(option);
}
async checkCancelAttachFormIsDisplayed(): Promise<void> {