[MNT-25411] Fix clearing filters when search input is empty (#4878)

* [MNT-25411] Fix clearing filters when search input is empty

* [MNT-25411] Fixed unit test

* [MNT-25411] Fixed unit test

* [MNT-25411] XAT-5589 fix

* [MNT-24511] fixes for XAT-5581 and XAT-5546 excluded

---------

Co-authored-by: Adam Świderski <adam.tomasz.swiderski@gmail.com>
This commit is contained in:
AleksanderSklorz
2025-11-04 10:51:02 +01:00
committed by GitHub
co-authored by Adam Świderski
parent bceaf89e6b
commit 9d3c80ffee
8 changed files with 98 additions and 13 deletions
@@ -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 SearchFiltersTags extends BaseComponent {
private static rootElement = '.adf-search-filter-menu-card';
@@ -35,10 +35,14 @@ export class SearchFiltersTags 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 filterByTag(page: SearchPage, tag: string): Promise<void> {
await page.searchFilters.tagsFilter.click();
await page.searchFiltersTags.addOptionInput.fill(tag);
await page.page.keyboard.press('Enter');
await this.searchOption(tag).click();
await page.searchFilters.menuCardApply.click();
await page.dataTable.progressBarWaitForReload();
}
@@ -89,6 +89,7 @@ export class SearchOverlayComponent extends BaseComponent {
}
async searchFor(input: string): Promise<void> {
await this.searchInput.clear();
await this.searchInput.fill(input);
await this.searchButton.click({ force: true });
}