UNPKG

@wordpress/e2e-test-utils

Version:
18 lines (17 loc) 523 B
async function switchBlockInspectorTab(label) { const tabButton = await page.$( `.block-editor-block-inspector__tabs button[aria-label="${label}"]` ); if (!tabButton) { throw new Error(`Missing block inspector tab: ${label}.`); } const id = await (await tabButton.getProperty("id")).jsonValue(); await tabButton.click(); await page.waitForSelector( `div[role="tabpanel"][aria-labelledby="${id}"]` ); } export { switchBlockInspectorTab }; //# sourceMappingURL=switch-block-inspector-tab.js.map