UNPKG

@wordpress/e2e-test-utils

Version:
10 lines (9 loc) 501 B
async function findSidebarPanelWithTitle(panelTitle) { const panelToggleSelector = `//div[contains(@class, "editor-sidebar")]//button[contains(@class, "components-panel__body-toggle") and contains(text(),"${panelTitle}")]`; const panelSelector = `${panelToggleSelector}/ancestor::*[contains(concat(" ", @class, " "), " components-panel__body ")]`; return await page.waitForXPath(panelSelector); } export { findSidebarPanelWithTitle }; //# sourceMappingURL=find-sidebar-panel-with-title.js.map