Skip to content

Commit

Permalink
Testing: Update sibling inserter E2E test
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth authored and youknowriad committed Oct 30, 2018
1 parent 32a2aa6 commit 50fdd4e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions test/e2e/specs/adding-blocks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,20 @@ describe( 'adding blocks', () => {
await page.click( '.editor-post-title__input' );

// Using the between inserter
const insertionPoint = await page.$( '[data-type="core/quote"] .editor-block-list__insertion-point-button' );
const insertionPoint = await page.$( '[data-type="core/quote"] .editor-inserter__toggle' );
const rect = await insertionPoint.boundingBox();
await page.mouse.move( rect.x + ( rect.width / 2 ), rect.y + ( rect.height / 2 ), { steps: 10 } );
await page.waitForSelector( '[data-type="core/quote"] .editor-block-list__insertion-point-button' );
await page.click( '[data-type="core/quote"] .editor-block-list__insertion-point-button' );
await page.waitForSelector( '[data-type="core/quote"] .editor-inserter__toggle' );
await page.click( '[data-type="core/quote"] .editor-inserter__toggle' );
// [TODO]: Search input should be focused immediately. It shouldn't be
// necessary to have `waitForFunction`.
await page.waitForFunction( () => (
document.activeElement &&
document.activeElement.classList.contains( 'editor-inserter__search' )
) );
await page.keyboard.type( 'para' );
await pressTimes( 'Tab', 3 );
await page.keyboard.press( 'Enter' );
await page.keyboard.type( 'Second paragraph' );

// Switch to Text Mode to check HTML Output
Expand Down

0 comments on commit 50fdd4e

Please sign in to comment.