@wordpress/e2e-test-utils
Version:
End-To-End (E2E) test utils for WordPress.
17 lines (16 loc) • 475 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.selectBlockByClientId = selectBlockByClientId;
/**
* Given the clientId of a block, selects the block on the editor.
*
* @param {string} clientId Identified of the block.
*/
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