From 1aaaa9320f75c042c007c21962b006cbc2b38f39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chy=C5=82a?= Date: Tue, 28 Jan 2025 09:37:50 +0100 Subject: [PATCH] Update navigation and order SALEOR_217 test --- playwright/pages/dialogs/addNavigationMenuItemDialog.ts | 6 +++++- playwright/pages/pageElements/rightSideDetailsSection.ts | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/playwright/pages/dialogs/addNavigationMenuItemDialog.ts b/playwright/pages/dialogs/addNavigationMenuItemDialog.ts index 8faa2b463b8..81a44503772 100644 --- a/playwright/pages/dialogs/addNavigationMenuItemDialog.ts +++ b/playwright/pages/dialogs/addNavigationMenuItemDialog.ts @@ -24,6 +24,8 @@ export class AddNavigationMenuItemDialog extends BasePage { await linkTypeOption.waitFor({ state: "visible" }); await expect(linkTypeOption).toBeEnabled(); await linkTypeOption.click({ force: true }); + await linkTypeOption.waitFor({ state: "hidden" }); + await this.menuLinkValue.blur(); // Verify the correct link type is selected const selectedLinkType = await this.menuLinkType.inputValue(); @@ -43,9 +45,11 @@ export class AddNavigationMenuItemDialog extends BasePage { await option.waitFor({ state: "visible" }); await expect(option).toBeEnabled(); await option.click({ force: true }); + await option.waitFor({ state: "hidden" }); + await this.menuLinkValue.blur(); // Verify the correct option is selected - await expect(this.menuLinkValue).toHaveValue(optionName); + await expect(this.menuLinkValue).toHaveValue(optionName, { timeout: 5000 }); } async typeMenuItemName(name: string) { diff --git a/playwright/pages/pageElements/rightSideDetailsSection.ts b/playwright/pages/pageElements/rightSideDetailsSection.ts index 83a958d1bdd..d4cf11be75b 100644 --- a/playwright/pages/pageElements/rightSideDetailsSection.ts +++ b/playwright/pages/pageElements/rightSideDetailsSection.ts @@ -187,7 +187,10 @@ export class RightSideDetailsPage extends BasePage { async typeAndSelectCustomerEmail(customerEmail = "customer@example.com") { await this.searchCustomerInput.fill(customerEmail); - await this.selectCustomerOption.locator(`text=${customerEmail}`).click(); + await this.selectCustomerOption + .filter({ hasText: customerEmail }) + .waitFor({ state: "visible" }); + await this.selectCustomerOption.filter({ hasText: customerEmail }).click(); } async selectOneChannelAsAvailableWhenMoreSelected(channel: string) {