diff --git a/packages/editor/src/components/post-status/index.js b/packages/editor/src/components/post-status/index.js index ca89e40366b238..1d3050e7e3dd6b 100644 --- a/packages/editor/src/components/post-status/index.js +++ b/packages/editor/src/components/post-status/index.js @@ -171,7 +171,7 @@ export default function PostStatus() { contentClassName="editor-change-status__content" popoverProps={ popoverProps } focusOnMount - renderToggle={ ( { onToggle } ) => ( + renderToggle={ ( { onToggle, isOpen } ) => ( diff --git a/test/e2e/specs/editor/various/change-detection.spec.js b/test/e2e/specs/editor/various/change-detection.spec.js index 30b2287a8d9439..12d13b4890e368 100644 --- a/test/e2e/specs/editor/various/change-detection.spec.js +++ b/test/e2e/specs/editor/various/change-detection.spec.js @@ -80,9 +80,7 @@ test.describe( 'Change detection', () => { // Toggle post as needing review (not persisted for autosave). await editor.openDocumentSettingsSidebar(); - await page - .getByRole( 'button', { name: 'Change post status:' } ) - .click(); + await page.getByRole( 'button', { name: 'Change status:' } ).click(); await page.getByRole( 'radio', { name: 'Pending' } ).click(); // Force autosave to occur immediately. await Promise.all( [ diff --git a/test/e2e/specs/editor/various/post-visibility.spec.js b/test/e2e/specs/editor/various/post-visibility.spec.js index 61cd5e65f01015..67c8597953815b 100644 --- a/test/e2e/specs/editor/various/post-visibility.spec.js +++ b/test/e2e/specs/editor/various/post-visibility.spec.js @@ -18,7 +18,7 @@ test.describe( 'Post visibility', () => { await editor.openDocumentSettingsSidebar(); await page - .getByRole( 'button', { name: 'Change post status:' } ) + .getByRole( 'button', { name: 'Change status:' } ) .click(); await page.getByRole( 'radio', { name: 'Private' } ).click(); @@ -57,9 +57,7 @@ test.describe( 'Post visibility', () => { name: 'Close', } ) .click(); - await page - .getByRole( 'button', { name: 'Change post status:' } ) - .click(); + await page.getByRole( 'button', { name: 'Change status:' } ).click(); await page.getByRole( 'radio', { name: 'Private' } ).click(); await page .getByRole( 'region', { name: 'Editor top bar' } ) diff --git a/test/e2e/specs/editor/various/preview.spec.js b/test/e2e/specs/editor/various/preview.spec.js index b25d1da48122ce..e15f143983b742 100644 --- a/test/e2e/specs/editor/various/preview.spec.js +++ b/test/e2e/specs/editor/various/preview.spec.js @@ -183,9 +183,7 @@ test.describe( 'Preview', () => { // Return to editor and switch to Draft. await editorPage.bringToFront(); - await page - .getByRole( 'button', { name: 'Change post status:' } ) - .click(); + await page.getByRole( 'button', { name: 'Change status:' } ).click(); await page.getByRole( 'radio', { name: 'Draft' } ).click(); await page .getByRole( 'region', { name: 'Editor top bar' } ) diff --git a/test/e2e/specs/editor/various/switch-to-draft.spec.js b/test/e2e/specs/editor/various/switch-to-draft.spec.js index 516de6d0c85cc5..81652d9c11e2bb 100644 --- a/test/e2e/specs/editor/various/switch-to-draft.spec.js +++ b/test/e2e/specs/editor/various/switch-to-draft.spec.js @@ -47,7 +47,7 @@ test.describe( 'Clicking "Switch to draft" on a published/scheduled post/page', await editor.openDocumentSettingsSidebar(); await page - .getByRole( 'button', { name: 'Change post status:' } ) + .getByRole( 'button', { name: 'Change status:' } ) .click(); await page.getByRole( 'radio', { name: 'Draft' } ).click();