Skip to content

Commit

Permalink
Fix e2e test inserting cover block (#31866)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored May 16, 2021
1 parent 449fb8b commit 80e562c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ describe( 'Inserting blocks', () => {
inserterMenuInputSelector
);
inserterMenuSearchInput.type( 'cover' );
await page.waitForSelector(
'.block-editor-block-types-list .editor-block-list-item-cover'
);
// clicking may be too quick and may select a detached node.
// Wait for the search results to load after typing the full search
// term. Previously this test would sometimes accidentally tab to the
// button for a code block.
await page.evaluate( () => new Promise( window.requestIdleCallback ) );
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Enter' );
Expand Down

0 comments on commit 80e562c

Please sign in to comment.