From da9f7cbb26e4e26d0681e3fa300afea79f3f7e59 Mon Sep 17 00:00:00 2001 From: Fraz Arshad Date: Wed, 13 Mar 2024 18:32:38 +0500 Subject: [PATCH] fix: added click after timeout to resolve flakiness --- commands/keplr.js | 3 ++- commands/playwright-keplr.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/keplr.js b/commands/keplr.js index 3fbaf11f3..47174ba01 100644 --- a/commands/keplr.js +++ b/commands/keplr.js @@ -333,8 +333,9 @@ const keplr = { await module.exports.goToHome(); } await playwright.waitAndClickByText(homePageElements.newTokensFound); - await playwright.waitAndClickWithRetry( + await playwright.waitAndClickWithDelay( homePageElements.selectAllTokensCheck, + 2000, { number: -1, force: true }, ); await playwright.waitAndClickByText( diff --git a/commands/playwright-keplr.js b/commands/playwright-keplr.js index 45b8e5e5f..1cfb79bbd 100644 --- a/commands/playwright-keplr.js +++ b/commands/playwright-keplr.js @@ -327,7 +327,7 @@ module.exports = { throw new Error(`Failed to click element after ${maxRetries} attempts`); }, - async waitAndClickWithDelay(selector, options, delay) { + async waitAndClickWithDelay(selector, delay, options) { const page = module.exports.keplrWindow(); await page.waitForTimeout(delay); await module.exports.waitAndClick(selector, page, options);