@wordpress/e2e-test-utils
Version:
End-To-End (E2E) test utils for WordPress.
11 lines • 347 B
JavaScript
/**
* Given the clientId of a block, selects the block on the editor.
*
* @param {string} clientId Identified of the block.
*/
export async function selectBlockByClientId(clientId) {
await page.evaluate(id => {
wp.data.dispatch('core/block-editor').selectBlock(id);
}, clientId);
}
//# sourceMappingURL=select-block-by-client-id.js.map