diff --git a/packages/sanity/src/structure/panes/document/documentPanel/header/perspective/DocumentPerspectiveList.tsx b/packages/sanity/src/structure/panes/document/documentPanel/header/perspective/DocumentPerspectiveList.tsx index eabf1f31c9e..1dbb9c7c51e 100644 --- a/packages/sanity/src/structure/panes/document/documentPanel/header/perspective/DocumentPerspectiveList.tsx +++ b/packages/sanity/src/structure/panes/document/documentPanel/header/perspective/DocumentPerspectiveList.tsx @@ -114,7 +114,7 @@ export const DocumentPerspectiveList = memo(function DocumentPerspectiveList() { )} } - disabled={!editState?.published} + disabled={editState?.liveEdit ? false : !editState?.published} onClick={handleBundleChange('published')} selected={ /** the publish is selected when: diff --git a/test/e2e/tests/document-actions/liveEdit.spec.ts b/test/e2e/tests/document-actions/liveEdit.spec.ts index 0323a714a1a..3c746e934cb 100644 --- a/test/e2e/tests/document-actions/liveEdit.spec.ts +++ b/test/e2e/tests/document-actions/liveEdit.spec.ts @@ -8,6 +8,9 @@ test(`liveEdited document can be created, edited, and deleted`, async ({ const name = 'Test Name' await createDraftDocument('/test/content/playlist') + await page.getByText('select the publish document to edit it') + // Navigate to the published perspective + await page.getByRole('button', {name: 'Published'}).click() await page.getByTestId('field-name').getByTestId('string-input').fill(name) await page.getByTestId('action-menu-button').click()