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 Mar 25, 2021
1 parent 4548f79 commit 8158d1d
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 8158d1d

Please sign in to comment.