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:
@@ -15,18 +15,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder, Locator } from 'protractor';
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
|
||||
export class ProcessFiltersCloudComponentPage {
|
||||
|
||||
filter: ElementFinder;
|
||||
filterIcon: Locator = by.xpath("ancestor::div[@class='mat-list-item-content']/mat-icon");
|
||||
filterIcon = by.css('adf-icon[data-automation-id="adf-filter-icon"]');
|
||||
|
||||
processFilters: ElementFinder = element(by.css("mat-expansion-panel[data-automation-id='Process Filters']"));
|
||||
|
||||
activeFilter: ElementFinder = element(by.css("mat-list-item[class*='active'] span"));
|
||||
activeFilter: ElementFinder = element(by.css('.adf-active [data-automation-id="adf-filter-label"]'));
|
||||
processFiltersList: ElementFinder = element(by.css('adf-cloud-process-filters'));
|
||||
|
||||
async checkProcessFilterIsDisplayed(filterName: string): Promise<void> {
|
||||
@@ -106,6 +106,6 @@ export class ProcessFiltersCloudComponentPage {
|
||||
}
|
||||
|
||||
getProcessFilterLocatorByFilterName(filterName: string): ElementFinder {
|
||||
return element(by.css(`span[data-automation-id="${filterName}_filter"]`));
|
||||
return element(by.css(`button[data-automation-id="${filterName}_filter"]`));
|
||||
}
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@ export class TaskFiltersCloudComponentPage {
|
||||
|
||||
filter: ElementFinder;
|
||||
taskFilters: ElementFinder = element(by.css(`mat-expansion-panel[data-automation-id='Task Filters']`));
|
||||
activeFilter: ElementFinder = element(by.css("mat-list-item[class*='active'] span"));
|
||||
activeFilter: ElementFinder = element(by.css('.adf-active [data-automation-id="adf-filter-label"]'));
|
||||
|
||||
async checkTaskFilterIsDisplayed(filterName: string): Promise<void> {
|
||||
this.filter = this.getTaskFilterLocatorByFilterName(filterName);
|
||||
@@ -51,7 +51,7 @@ export class TaskFiltersCloudComponentPage {
|
||||
}
|
||||
|
||||
getTaskFilterLocatorByFilterName(filterName: string): ElementFinder {
|
||||
return element(by.css(`span[data-automation-id="${filterName}-filter"]`));
|
||||
return element(by.css(`button[data-automation-id="${filterName}_filter"]`));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -17,13 +17,13 @@
|
||||
|
||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
import { by, element, ElementFinder, Locator } from 'protractor';
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
|
||||
export class FiltersPage {
|
||||
|
||||
accordionMenu: ElementFinder = element(by.css('.app-processes-menu mat-accordion'));
|
||||
buttonWindow: ElementFinder = element(by.css('div > button[data-automation-id="btn-start-process"] > div'));
|
||||
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 clickFilterButton(filterElement: ElementFinder): Promise<void> {
|
||||
await BrowserActions.click(filterElement);
|
||||
@@ -34,7 +34,7 @@ export class FiltersPage {
|
||||
}
|
||||
|
||||
async isFilterHighlighted(filterName): Promise<boolean> {
|
||||
const processNameHighlighted: ElementFinder = element(by.css(`mat-list-item.adf-active span[data-automation-id='${filterName}_filter']`));
|
||||
const processNameHighlighted: ElementFinder = element(by.css(`.adf-active button[data-automation-id='${filterName}_filter']`));
|
||||
try {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(processNameHighlighted);
|
||||
return true;
|
||||
@@ -44,7 +44,7 @@ export class FiltersPage {
|
||||
}
|
||||
|
||||
async isFilterDisplayed(name): Promise<boolean> {
|
||||
const filterName: ElementFinder = element(by.css(`span[data-automation-id='${name}_filter']`));
|
||||
const filterName: ElementFinder = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||
try {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
||||
return true;
|
||||
@@ -54,13 +54,13 @@ export class FiltersPage {
|
||||
}
|
||||
|
||||
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);
|
||||
|
@@ -22,9 +22,9 @@ export class ProcessFiltersPage {
|
||||
|
||||
filtersPage = new FiltersPage();
|
||||
|
||||
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"]'));
|
||||
accordionMenu: ElementFinder = element(by.css('.app-processes-menu mat-accordion'));
|
||||
|
||||
async clickRunningFilterButton(): Promise<void> {
|
||||
|
@@ -22,10 +22,10 @@ export class TaskFiltersPage {
|
||||
|
||||
filtersPage = new FiltersPage();
|
||||
|
||||
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"]'));
|
||||
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"]'));
|
||||
accordionMenu: ElementFinder = element(by.css('.app-processes-menu mat-accordion'));
|
||||
|
||||
async clickMyTasksFilterButton(): Promise<void> {
|
||||
|
Reference in New Issue
Block a user