Skip to content

Commit

Permalink
Stabilise typewriter e2e test (#31472)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored May 4, 2021
1 parent d176475 commit 9c242ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/e2e-tests/specs/editor/various/typewriter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ describe( 'TypeWriter', () => {
wp.dom.getScrollContainer( document.activeElement )
.scrollTop === 2
);
// Wait for the caret rectangle to be recalculated.
await page.evaluate(
() => new Promise( window.requestAnimationFrame )
);

// After hitting Enter to create a new block, the caret screen
// coordinates should be the same.
Expand Down

0 comments on commit 9c242ee

Please sign in to comment.