UNPKG

@wordpress/e2e-test-utils

Version:
21 lines (20 loc) 644 B
import { hasBlockSwitcher } from "./has-block-switcher"; const getAvailableBlockTransforms = async () => { if (!await hasBlockSwitcher()) { return []; } await page.click( ".block-editor-block-toolbar .block-editor-block-switcher" ); return page.evaluate((buttonSelector) => { return Array.from(document.querySelectorAll(buttonSelector)).map( (button) => { return button.textContent; } ); }, ".block-editor-block-switcher__popover .block-editor-block-switcher__transforms__menugroup button"); }; export { getAvailableBlockTransforms }; //# sourceMappingURL=get-available-block-transforms.js.map