Fix Media Library test storage and scope sidebar selectors

This commit is contained in:
2026-10-13 17:57:41 +08:00
parent af866bc20e
commit 04f19543d3
6 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ async function readyPreview(block) {
async function openInspectorPanel(page, name, control) {
await page.evaluate(() => window.wp.data.dispatch('core/edit-post').openGeneralSidebar('edit-post/block'));
if (!await control.isVisible()) {
await page.getByRole('button', { name, exact: true }).click();
await page.locator('.components-panel__body-toggle').filter({ hasText: new RegExp(`^${name}$`) }).click();
}
await expect(control).toBeVisible();
}