added test for the visible flag both for process list and task list action menu and context menu (#5190)

This commit is contained in:
Geeta Mandakini Ayyalasomayajula
2019-10-25 01:07:18 +01:00
committed by Eugenio Romano
parent ef229dd300
commit eefc201332
5 changed files with 29 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ export class ProcessListCloudComponentPage {
processList: ElementFinder = element(by.css('adf-cloud-process-list'));
noProcessFound: ElementFinder = element.all(by.css("div[class='adf-empty-content__title']")).first();
actionMenu: ElementFinder = element(by.css('div[role="menu"]'));
actionMenu: ElementFinder = element(by.css('*[role="menu"]'));
optionButton: Locator = by.css('button[data-automation-id*="action_menu_"]');
dataTable: DataTableComponentPage = new DataTableComponentPage(this.processList);
@@ -127,4 +127,9 @@ export class ProcessListCloudComponentPage {
await BrowserActions.clickExecuteScript(`button[data-automation-id="context-${actionName}"]`);
}
async getNumberOfOptions(): Promise<number> {
const options = await this.actionMenu.all(by.css(`button`));
return options.length;
}
}

View File

@@ -36,7 +36,7 @@ export class TaskListCloudComponentPage {
taskList = element(by.css('adf-cloud-task-list'));
noTasksFound = element.all(by.css("div[class='adf-empty-content__title']")).first();
actionMenu: ElementFinder = element(by.css('div[role="menu"]'));
actionMenu: ElementFinder = element(by.css('*[role="menu"]'));
optionButton: Locator = by.css('button[data-automation-id*="action_menu_"]');
dataTable = new DataTableComponentPage(this.taskList);
@@ -183,4 +183,9 @@ export class TaskListCloudComponentPage {
await BrowserActions.clickExecuteScript(`button[data-automation-id="context-${actionName}"]`);
}
async getNumberOfOptions(): Promise<number> {
const options = await this.actionMenu.all(by.css(`button`));
return options.length;
}
}