Skip to content

Commit

Permalink
Replace timeout with puppeteer function.
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Oct 19, 2021
1 parent c53c583 commit 6c5cf4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/visual-regression/specs/visual-snapshots.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async function hideElementVisibility( elements ) {
} );
}
}
await new Promise( ( resolve ) => setTimeout( resolve, 1000 ) );
await page.waitFor( 1000 );
}

async function removeElementFromLayout( elements ) {
Expand All @@ -26,7 +26,7 @@ async function removeElementFromLayout( elements ) {
} );
}
}
await new Promise( ( resolve ) => setTimeout( resolve, 1000 ) );
await page.waitFor( 1000 );
}

const elementsToHide = [ '#footer-upgrade', '#wp-admin-bar-root-default' ];
Expand Down

0 comments on commit 6c5cf4f

Please sign in to comment.