Skip to content

Commit

Permalink
chore: lower timeout to change to notification window
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Mucha <[email protected]>
  • Loading branch information
drptbl committed Sep 3, 2021
1 parent d11ceb5 commit ba24520
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions commands/puppeteer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand All @@ -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;
Expand Down

0 comments on commit ba24520

Please sign in to comment.