@wordpress/e2e-test-utils
Version:
End-To-End (E2E) test utils for WordPress.
16 lines (15 loc) • 605 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getListViewBlocks = getListViewBlocks;
/**
* Gets all block anchor nodes in the list view that match a given block name label.
*
* @param {string} blockLabel the label of the block as displayed in the ListView.
* @return {Promise} all the blocks anchor nodes matching the label in the ListView.
*/
async function getListViewBlocks(blockLabel) {
return page.$x(`//table[contains(@aria-label,'Block navigation structure')]//a[.//span[text()='${blockLabel}']]`);
}
//# sourceMappingURL=get-list-view-blocks.js.map