From ba2452011c70eb49025548e7dc52ae0cad041bf8 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Sat, 4 Sep 2021 01:01:31 +0200 Subject: [PATCH] chore: lower timeout to change to notification window Signed-off-by: Jakub Mucha --- commands/puppeteer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/puppeteer.js b/commands/puppeteer.js index 2106c10ad..806a58958 100644 --- a/commands/puppeteer.js +++ b/commands/puppeteer.js @@ -96,7 +96,7 @@ module.exports = { return true; }, switchToMetamaskNotification: async () => { - await metamaskWindow.waitForTimeout(3000); + await metamaskWindow.waitForTimeout(500); let pages = await puppeteerBrowser.pages(); for (const page of pages) { if (page.url().includes('notification')) { @@ -106,7 +106,8 @@ module.exports = { } } - if (switchToMetamaskNotificationRetries < 4) { + // 24*500ms = 12 seconds in total + if (switchToMetamaskNotificationRetries < 24) { switchToMetamaskNotificationRetries++; const page = await module.exports.switchToMetamaskNotification(); return page;