mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[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:
co-authored by
Adam Świderski
parent
bceaf89e6b
commit
9d3c80ffee
+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 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();
|
||||
}
|
||||
|
||||
+1
@@ -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 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user