mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-10383] [E2E] fixed XAT-5603 and XAT-5604 (#4864)
* [ACS-10383] [E2E] fixed XAT-5603 and XAT-5604 * [ACS-10383] review fixes 1
This commit is contained in:
+6
-2
@@ -24,7 +24,7 @@
|
||||
|
||||
import { SearchPage } from '../../../pages';
|
||||
import { BaseComponent } from '../../base.component';
|
||||
import { Page } from '@playwright/test';
|
||||
import { Page, Locator } from '@playwright/test';
|
||||
|
||||
export class SearchFiltersLocation extends BaseComponent {
|
||||
private static rootElement = '.adf-search-filter-menu-card';
|
||||
@@ -35,10 +35,14 @@ export class SearchFiltersLocation extends BaseComponent {
|
||||
|
||||
public addOptionInput = this.getChild(`[data-automation-id$='adf-search-chip-autocomplete-input']`);
|
||||
|
||||
private searchOption(value: string): Locator {
|
||||
return this.page.locator(`[data-automation-id="option-${value}"]`);
|
||||
}
|
||||
|
||||
async filterByLocation(page: SearchPage, location: string): Promise<void> {
|
||||
await page.searchFilters.locationFilter.click();
|
||||
await page.searchFiltersLocation.addOptionInput.fill(location);
|
||||
await page.page.keyboard.press('Enter');
|
||||
await page.searchFiltersLocation.searchOption(location).click();
|
||||
await page.searchFilters.menuCardApply.click();
|
||||
await page.dataTable.progressBarWaitForReload();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user