From f8bba0e489b782c53b3dffeedd5e05931383b022 Mon Sep 17 00:00:00 2001 From: frazarshad Date: Thu, 14 Mar 2024 11:17:04 +0500 Subject: [PATCH] fix: added click after timeout to resolve flakiness (#28) --- 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);