Skip to content

Commit 2ed16ca

Browse files
Merge pull request #75 from nesrineabdmouleh/fixFilterByCheckboxInHummingbirdTheme
Add timeout in filter by checkbox in category page
2 parents 3782a90 + 668c848 commit 2ed16ca

File tree

1 file changed

+3
-3
lines changed
  • src/versions/develop/pages/FO/hummingbird/category

1 file changed

+3
-3
lines changed

src/versions/develop/pages/FO/hummingbird/category/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,18 @@ class CategoryPage extends CategoryPageVersion implements FoCategoryPageInterfac
7474
* @param page {Page} Browser tab
7575
* @param facetType {string} Type of filter
7676
* @param checkboxName {string} Checkbox name
77-
* @param toEnable {boolean} True if we need to enable (Not used in Hummingbird method)
7877
* @return {Promise<void>}
7978
*/
80-
async filterByCheckbox(page: Page, facetType: string, checkboxName: string, toEnable: boolean): Promise<void> {
81-
console.log(`To-Do : Enable parameter 'toEnable' (value: ${toEnable})`);
79+
async filterByCheckbox(page: Page, facetType: string, checkboxName: string): Promise<void> {
8280
await page.locator(this.filterTypeButton(facetType)).click();
81+
await page.waitForTimeout(2000);
8382
if (facetType === 'Color') {
8483
await page.locator(`${this.searchFiltersLabel} span[style*="${checkboxName}"]`).click();
8584
} else {
8685
await page.locator(`${this.searchFiltersLabel} a[href*="${checkboxName}"]`).click();
8786
}
8887
await page.locator(this.filterTypeButton(facetType)).click();
88+
await page.waitForTimeout(2000);
8989
}
9090

9191
/**

0 commit comments

Comments
 (0)