From 70b2c40d0b0e9fd1c6b05ac34a87b27816b9763f Mon Sep 17 00:00:00 2001 From: Renata Date: Wed, 15 May 2024 13:55:55 +0200 Subject: [PATCH] [QA] Fixing flaky test - TC: SALEOR_205 Bulk delete customers (#4857) * Fixing flaky test - TC: SALEOR_205 Bulk delete customers * fixing flaky gift card tests --- .changeset/tame-foxes-breathe.md | 5 +++++ playwright/pages/basePage.ts | 1 + playwright/pages/giftCardsPage.ts | 2 ++ 3 files changed, 8 insertions(+) create mode 100644 .changeset/tame-foxes-breathe.md diff --git a/.changeset/tame-foxes-breathe.md b/.changeset/tame-foxes-breathe.md new file mode 100644 index 00000000000..5b48208c6c1 --- /dev/null +++ b/.changeset/tame-foxes-breathe.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": minor +--- + +Fixing still flaky test - TC: SALEOR_205 Bulk delete customers diff --git a/playwright/pages/basePage.ts b/playwright/pages/basePage.ts index 77cd7fa4f8e..d9554789148 100644 --- a/playwright/pages/basePage.ts +++ b/playwright/pages/basePage.ts @@ -71,6 +71,7 @@ export class BasePage { async typeInSearchOnListView(searchItem: string) { await this.waitForNetworkIdle(async () => { await this.searchInputListView.fill(searchItem); + await this.loader.waitFor({ state: "attached" }); await this.waitForGrid(); await this.waitForDOMToFullyLoad(); }); diff --git a/playwright/pages/giftCardsPage.ts b/playwright/pages/giftCardsPage.ts index aa6c717538e..25ebbbe352c 100644 --- a/playwright/pages/giftCardsPage.ts +++ b/playwright/pages/giftCardsPage.ts @@ -51,6 +51,8 @@ export class GiftCardsPage extends BasePage { async clickIssueCardButton() { await this.issueCardButton.click(); + await this.loader.waitFor({ state: "hidden" }); + await this.giftCardDialog.waitFor({ state: "visible" }); } async clickBulkDeleteButton() {