Skip to content

Commit

Permalink
fix: added click after timeout to resolve flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
frazarshad committed Mar 13, 2024
1 parent 96b238b commit 9181a63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion commands/keplr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion commands/playwright-keplr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9181a63

Please sign in to comment.