Skip to content

Commit 5719d1d

Browse files
Merge pull request #245 from nesrineabdmouleh/fixGoToSubmenuMethod
Fix go to submenu method
2 parents 6d0ed66 + d5e110d commit 5719d1d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/pages/FO/FOBasePage.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -528,9 +528,10 @@ export default class FOBasePage extends CommonPage implements FOBasePagePageInte
528528
* @returns {Promise<void>}
529529
*/
530530
async goToSubCategory(page: Page, categoryID: number, subCategoryID: number): Promise<void> {
531-
await page.locator(this.categoryMenu(categoryID)).first().hover();
532-
await page.locator(this.categoryMenu(subCategoryID)).click();
533-
await page.waitForLoadState();
531+
await Promise.all([
532+
page.locator(this.categoryMenu(categoryID)).first().hover(),
533+
this.clickAndWaitForURL(page, this.categoryMenu(subCategoryID)),
534+
]);
534535
}
535536

536537
/**

0 commit comments

Comments
 (0)