UNPKG

@wordpress/e2e-test-utils

Version:
16 lines (15 loc) 605 B
"use strict"; 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