Skip to content

Commit

Permalink
Ensure the block is focussed after it's inserted.
Browse files Browse the repository at this point in the history
  • Loading branch information
pento committed Nov 22, 2019
1 parent cad7c40 commit 2805b85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/e2e/lib/pages/wp-admin/block-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Page from '../page';
/**
* WordPress dependencies
*/
import { getAllBlocks, searchForBlock } from '@wordpress/e2e-test-utils';
import { getAllBlocks, searchForBlock, selectBlockByClientId } from '@wordpress/e2e-test-utils';
import { waitAndClick, waitForSelector, scrollIntoView } from '../../page-helper';
import { getNgrokSiteUrl } from '../../utils-helper';

Expand All @@ -23,6 +23,7 @@ export default class BlockEditorPage extends Page {
await scrollIntoView( this.page, jetpackPanelSelector );
await waitAndClick( this.page, blockIconSelector );
const blockInfo = await this.getInsertedBlock();
await selectBlockByClientId( blockInfo.clientId );
return blockInfo;
}

Expand Down

0 comments on commit 2805b85

Please sign in to comment.