Skip to content

Commit

Permalink
Try fixing the e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Feb 21, 2020
1 parent 2737f22 commit 92e94e7
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ describe.each( [
if ( ! isUnifiedToolbar ) {
it( 'should not scroll page', async () => {
while (
await page.evaluate(
() =>
wp.dom.getScrollContainer( document.activeElement )
.scrollTop === 0
)
await page.evaluate( () => {
const scrollable = wp.dom.getScrollContainer(
document.activeElement
);
return ! scrollable || scrollable.scrollTop === 0;
} )
) {
await page.keyboard.press( 'Enter' );
}
Expand Down

0 comments on commit 92e94e7

Please sign in to comment.