diff --git a/e2e/process-services-cloud/task-list/edit-process-filters-component.e2e.ts b/e2e/process-services-cloud/task-list/edit-process-filters-component.e2e.ts index cd16708f5ff..589809bb879 100644 --- a/e2e/process-services-cloud/task-list/edit-process-filters-component.e2e.ts +++ b/e2e/process-services-cloud/task-list/edit-process-filters-component.e2e.ts @@ -71,7 +71,7 @@ describe('Edit process filters cloud', () => { await processFilter.clickOnProcessFilters(); await editProcessFilter.openFilter(); - await editProcessFilter.checkCustomiseFilterHeaderIsExpanded(); + await editProcessFilter.checkHeaderIsExpanded(); await processFilter.clickAllProcessesFilter(); }); @@ -119,13 +119,13 @@ describe('Edit process filters cloud', () => { await expect(await processFilter.getActiveFilterName()).toBe('New'); await editProcessFilter.openFilter(); - await editProcessFilter.checkCustomiseFilterHeaderIsExpanded(); + await editProcessFilter.checkHeaderIsExpanded(); await editProcessFilter.setSortFilterDropDown('Process Name'); await expect(await editProcessFilter.getSortFilterDropDownValue()).toEqual('Process Name'); await editProcessFilter.clickSaveButton(); await editProcessFilter.openFilter(); - await editProcessFilter.checkCustomiseFilterHeaderIsExpanded(); + await editProcessFilter.checkHeaderIsExpanded(); await browser.driver.sleep(1000); @@ -179,7 +179,7 @@ describe('Edit process filters cloud', () => { await dialog.clickOnCancelButton(); await editProcessFilter.openFilter(); - await editProcessFilter.checkCustomiseFilterHeaderIsExpanded(); + await editProcessFilter.checkHeaderIsExpanded(); await editProcessFilter.setSortFilterDropDown('Start Date'); await expect(await editProcessFilter.getSortFilterDropDownValue()).toEqual('Start Date'); await editProcessFilter.clickSaveButton(); diff --git a/lib/testing/src/lib/process-services-cloud/pages/edit-process-filter-cloud-component.page.ts b/lib/testing/src/lib/process-services-cloud/pages/edit-process-filter-cloud-component.page.ts index 29e5a8df400..0b0c1d32c12 100644 --- a/lib/testing/src/lib/process-services-cloud/pages/edit-process-filter-cloud-component.page.ts +++ b/lib/testing/src/lib/process-services-cloud/pages/edit-process-filter-cloud-component.page.ts @@ -67,10 +67,16 @@ export class EditProcessFilterCloudComponentPage { await browser.driver.sleep(5000); } - async checkCustomiseFilterHeaderIsExpanded(): Promise { - const expansionPanelExtended = element.all(by.css('mat-expansion-panel-header[class*="mat-expanded"]')).first(); + async expandFilter(): Promise { + await this.isFilterDisplayed(); + await BrowserActions.click(this.customiseFilter); + await this.checkHeaderIsExpanded(); + } + + async checkHeaderIsExpanded(): Promise { + const expansionPanelExtended = element.all(by.css('mat-expansion-panel-header.mat-expanded')).first(); await BrowserVisibility.waitUntilElementIsVisible(expansionPanelExtended); - const content = element.all(by.css('div[class*="mat-expansion-panel-content "][style*="visible"]')).first(); + const content = element.all(by.css('div.mat-expansion-panel-content[style*="visible"]')).first(); await BrowserVisibility.waitUntilElementIsVisible(content); } @@ -218,7 +224,7 @@ export class EditProcessFilterCloudComponentPage { } async setFilter(props: FilterProps): Promise { - await this.openFilter(); + await this.expandFilter(); if (props.name) { await this.setProcessName(props.name); } if (props.status) { await this.setStatusFilterDropDown(props.status); } if (props.sort) { await this.setSortFilterDropDown(props.sort); } diff --git a/lib/testing/src/lib/process-services-cloud/pages/edit-task-filter-cloud-component.page.ts b/lib/testing/src/lib/process-services-cloud/pages/edit-task-filter-cloud-component.page.ts index 19cf34a7461..dc5c0c27a8a 100644 --- a/lib/testing/src/lib/process-services-cloud/pages/edit-task-filter-cloud-component.page.ts +++ b/lib/testing/src/lib/process-services-cloud/pages/edit-task-filter-cloud-component.page.ts @@ -78,6 +78,19 @@ export class EditTaskFilterCloudComponentPage { await browser.driver.sleep(1000); } + async expandFilter(): Promise { + await this.isFilterDisplayed(); + await BrowserActions.click(this.customiseFilter); + await this.checkHeaderIsExpanded(); + } + + async checkHeaderIsExpanded(): Promise { + const expansionPanelExtended = element.all(by.css('mat-expansion-panel-header.mat-expanded')).first(); + await BrowserVisibility.waitUntilElementIsVisible(expansionPanelExtended); + const content = element.all(by.css('div.mat-expansion-panel-content[style*="visible"]')).first(); + await BrowserVisibility.waitUntilElementIsVisible(content); + } + async setStatusFilterDropDown(option: StatusType): Promise { await this.statusDropdown.selectDropdownOption(option); await this.dataTable.waitTillContentLoaded();