diff --git a/packages/volto/cypress/tests/workingCopy/create.js b/packages/volto/cypress/tests/workingCopy/create.js index 9d72f4c2c5..a91158919d 100644 --- a/packages/volto/cypress/tests/workingCopy/create.js +++ b/packages/volto/cypress/tests/workingCopy/create.js @@ -50,9 +50,9 @@ describe('Working Copy Tests - Create', () => { cy.findByText('View working copy'); }); - it('Portal root does not have create option', function () { + it('Portal root have create option', function () { cy.visit('/'); cy.get('#toolbar-more').click(); - cy.get('.menu-more').contains('Create working copy').should('not.exist'); + cy.get('.menu-more').contains('Create working copy').should('exist'); }); }); diff --git a/packages/volto/news/5284.feature b/packages/volto/news/5284.feature new file mode 100644 index 0000000000..9efefd148b --- /dev/null +++ b/packages/volto/news/5284.feature @@ -0,0 +1 @@ +Shows working copy options for Plone Site. @wesleybl diff --git a/packages/volto/src/components/manage/Toolbar/More.jsx b/packages/volto/src/components/manage/Toolbar/More.jsx index cef48d19cc..5ae2007fa8 100644 --- a/packages/volto/src/components/manage/Toolbar/More.jsx +++ b/packages/volto/src/components/manage/Toolbar/More.jsx @@ -321,125 +321,124 @@ const More = (props) => { )} - {config.settings.hasWorkingCopySupport && - content['@type'] !== 'Plone Site' && ( - <> - {!content.working_copy && ( - -
  • - -
  • -
    - )} - {content.working_copy && content.working_copy_of && ( - -
  • - +
  • +
    + )} + {content.working_copy && content.working_copy_of && ( + +
  • + -
  • -
  • - -
  • -
    - )} - {content.working_copy && !content.working_copy_of && ( - -
  • - props.closeMenu()} - > - {intl.formatMessage(messages.viewWorkingCopy)} - - -
  • -
    - )} - - )} + + + +
  • + +
  • + + )} + {content.working_copy && !content.working_copy_of && ( + +
  • + props.closeMenu()} + > + {intl.formatMessage(messages.viewWorkingCopy)} + + +
  • +
    + )} + + )} {editAction && config.settings.isMultilingual && (