ACS-7335 Migrated e2e search filters - location (#3793)

This commit is contained in:
Katarzyna Kita
2024-04-16 10:52:23 +02:00
committed by GitHub
parent 40add06993
commit 7982c1e7e7
2 changed files with 102 additions and 0 deletions

View File

@@ -24,6 +24,7 @@
import { BaseComponent } from '../../base.component';
import { Page } from '@playwright/test';
import { SearchPage } from '@alfresco/playwright-shared';
export class SearchFiltersLocation extends BaseComponent {
private static rootElement = '.adf-search-filter-menu-card';
@@ -33,4 +34,13 @@ export class SearchFiltersLocation extends BaseComponent {
}
public addOptionInput = this.getChild(`[data-automation-id$='adf-search-chip-autocomplete-input']`);
public applyButton = this.page.locator('#apply-filter-button');
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.applyButton.click();
await page.dataTable.progressBarWaitForReload();
}
}