mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5103] FE - Process/task filter - Backporting the components styles to ADF (#5614)
* * New Filters style * * Improved css * * Fixed wrong css selector * * Fixed failing unit tests * * Fixed failing tests ests * * FIXED E2E PROCESS-SERVICE TESTS * * Fixed failing e2e * * FIxed process-service cloud e2e * * Removed xpath locator * * New Filters style * * Improved css
This commit is contained in:
@@ -21,11 +21,11 @@ import { TaskFiltersPage } from '../../process-services/task-filters.page';
|
||||
|
||||
export class TaskFiltersDemoPage {
|
||||
|
||||
myTasks: ElementFinder = element(by.css('span[data-automation-id="My Tasks_filter"]'));
|
||||
queuedTask: ElementFinder = element(by.css('span[data-automation-id="Queued Tasks_filter"]'));
|
||||
completedTask: ElementFinder = element(by.css('span[data-automation-id="Completed Tasks_filter"]'));
|
||||
involvedTask: ElementFinder = element(by.css('span[data-automation-id="Involved Tasks_filter"]'));
|
||||
activeFilter: ElementFinder = element(by.css("mat-list-item[class*='active']"));
|
||||
myTasks: ElementFinder = element(by.css('button[data-automation-id="My Tasks_filter"]'));
|
||||
queuedTask: ElementFinder = element(by.css('button[data-automation-id="Queued Tasks_filter"]'));
|
||||
completedTask: ElementFinder = element(by.css('button[data-automation-id="Completed Tasks_filter"]'));
|
||||
involvedTask: ElementFinder = element(by.css('button[data-automation-id="Involved Tasks_filter"]'));
|
||||
activeFilter: ElementFinder = element(by.css('adf-task-filters .adf-active'));
|
||||
|
||||
myTasksFilter(): TaskFiltersPage {
|
||||
return new TaskFiltersPage(this.myTasks);
|
||||
@@ -44,7 +44,7 @@ export class TaskFiltersDemoPage {
|
||||
}
|
||||
|
||||
customTaskFilter(filterName): TaskFiltersPage {
|
||||
return new TaskFiltersPage(element(by.css(`span[data-automation-id="${filterName}_filter"]`)));
|
||||
return new TaskFiltersPage(element(by.css(`button[data-automation-id="${filterName}_filter"]`)));
|
||||
}
|
||||
|
||||
async checkActiveFilterActive(): Promise<string> {
|
||||
|
@@ -20,7 +20,7 @@ import { by, element, ElementFinder } from 'protractor';
|
||||
|
||||
export class FiltersPage {
|
||||
|
||||
activeFilter: ElementFinder = element(by.css('mat-list-item[class*="active"]'));
|
||||
activeFilter: ElementFinder = element(by.css('.adf-active'));
|
||||
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
||||
|
||||
async getActiveFilter(): Promise<string> {
|
||||
@@ -29,7 +29,7 @@ export class FiltersPage {
|
||||
|
||||
async goToFilter(filterName): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.clickExecuteScript(`span[data-automation-id="${filterName}_filter"]`);
|
||||
await BrowserActions.clickExecuteScript(`button[data-automation-id="${filterName}_filter"]`);
|
||||
}
|
||||
|
||||
async sortByName(sortOrder: string): Promise<void> {
|
||||
@@ -41,7 +41,7 @@ export class FiltersPage {
|
||||
}
|
||||
|
||||
async checkFilterIsHighlighted(filterName: string): Promise<void> {
|
||||
const highlightedFilter: ElementFinder = element(by.css(`mat-list-item.adf-active span[data-automation-id='${filterName}_filter']`));
|
||||
const highlightedFilter: ElementFinder = element(by.css(`.adf-active button[data-automation-id='${filterName}_filter']`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(highlightedFilter);
|
||||
}
|
||||
}
|
||||
|
@@ -21,9 +21,9 @@ import { by, element, ElementFinder, Locator } from 'protractor';
|
||||
export class ProcessFiltersPage {
|
||||
|
||||
dataTable = new DataTableComponentPage();
|
||||
runningFilter: ElementFinder = element(by.css('span[data-automation-id="Running_filter"]'));
|
||||
completedFilter: ElementFinder = element(by.css('div[class="mat-list-text"] > span[data-automation-id="Completed_filter"]'));
|
||||
allFilter: ElementFinder = element(by.css('span[data-automation-id="All_filter"]'));
|
||||
runningFilter: ElementFinder = element(by.css('button[data-automation-id="Running_filter"]'));
|
||||
completedFilter: ElementFinder = element(by.css('button[data-automation-id="Completed_filter"]'));
|
||||
allFilter: ElementFinder = element(by.css('button[data-automation-id="All_filter"]'));
|
||||
createProcessButton: ElementFinder = element(by.css('.app-processes-menu button[data-automation-id="create-button"] > span'));
|
||||
newProcessButton: ElementFinder = element(by.css('div > button[data-automation-id="btn-start-process"]'));
|
||||
processesPage: ElementFinder = element(by.css('div[class="app-grid"] > div[class="app-grid-item app-processes-menu"]'));
|
||||
@@ -33,7 +33,7 @@ export class ProcessFiltersPage {
|
||||
rows: Locator = by.css('adf-process-instance-list div[class="adf-datatable-body"] adf-datatable-row[class*="adf-datatable-row"]');
|
||||
tableBody: ElementFinder = element.all(by.css('adf-datatable div[class="adf-datatable-body"]')).first();
|
||||
nameColumn: Locator = by.css('div[class*="adf-datatable-body"] adf-datatable-row[class*="adf-datatable-row"] div[title="Name"] span');
|
||||
processIcon: Locator = by.xpath('ancestor::div[@class="mat-list-item-content"]/mat-icon');
|
||||
processIcon = by.css('adf-icon[data-automation-id="adf-filter-icon"]');
|
||||
|
||||
async startProcess(): Promise<StartProcessPage> {
|
||||
await this.clickCreateProcessButton();
|
||||
@@ -78,7 +78,7 @@ export class ProcessFiltersPage {
|
||||
}
|
||||
|
||||
async checkFilterIsHighlighted(filterName): Promise<void> {
|
||||
const processNameHighlighted: ElementFinder = element(by.css(`mat-list-item.adf-active span[data-automation-id='${filterName}_filter']`));
|
||||
const processNameHighlighted: ElementFinder = element(by.css(`adf-process-instance-filters .adf-active button[data-automation-id='${filterName}_filter']`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(processNameHighlighted);
|
||||
}
|
||||
|
||||
@@ -104,25 +104,25 @@ export class ProcessFiltersPage {
|
||||
}
|
||||
|
||||
async checkFilterIsDisplayed(name): Promise<void> {
|
||||
const filterName: ElementFinder = element(by.css(`span[data-automation-id='${name}_filter']`));
|
||||
const filterName: ElementFinder = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
||||
}
|
||||
|
||||
async checkFilterHasNoIcon(name): Promise<void> {
|
||||
const filterName: ElementFinder = element(by.css(`span[data-automation-id='${name}_filter']`));
|
||||
const filterName: ElementFinder = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(filterName.element(this.processIcon));
|
||||
}
|
||||
|
||||
async getFilterIcon(name): Promise<string> {
|
||||
const filterName: ElementFinder = element(by.css(`span[data-automation-id='${name}_filter']`));
|
||||
const filterName: ElementFinder = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
||||
const icon = filterName.element(this.processIcon);
|
||||
return BrowserActions.getText(icon);
|
||||
}
|
||||
|
||||
async checkFilterIsNotDisplayed(name): Promise<void> {
|
||||
const filterName: ElementFinder = element(by.css(`span[data-automation-id='${name}_filter']`));
|
||||
const filterName: ElementFinder = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(filterName);
|
||||
}
|
||||
|
||||
|
@@ -15,13 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, ElementFinder, Locator } from 'protractor';
|
||||
import { by, ElementFinder } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class TaskFiltersPage {
|
||||
|
||||
filter;
|
||||
taskIcon: Locator = by.xpath("ancestor::div[@class='mat-list-item-content']/mat-icon");
|
||||
taskIcon = by.css('adf-icon[data-automation-id="adf-filter-icon"]');
|
||||
|
||||
constructor(filter: ElementFinder) {
|
||||
this.filter = filter;
|
||||
|
Reference in New Issue
Block a user