fix(ui): hide dot menu in read-only mode for locked documents (#8342)

This commit is contained in:
Patrik
2024-09-20 15:48:57 -04:00
committed by GitHub
parent 55afbe589c
commit 493b121ae8
2 changed files with 2 additions and 1 deletions

View File

@@ -243,7 +243,7 @@ export const DocumentControls: React.FC<{
</Button> </Button>
)} )}
</div> </div>
{showDotMenu && ( {showDotMenu && !readOnlyForIncomingUser && (
<Popup <Popup
button={ button={
<div className={`${baseClass}__dots`}> <div className={`${baseClass}__dots`}>

View File

@@ -391,6 +391,7 @@ describe('locked documents', () => {
// save buttons should be readOnly / disabled // save buttons should be readOnly / disabled
await expect(page.locator('#action-save-draft')).toBeDisabled() await expect(page.locator('#action-save-draft')).toBeDisabled()
await expect(page.locator('#action-save')).toBeDisabled() await expect(page.locator('#action-save')).toBeDisabled()
await expect(page.locator('.doc-controls__dots')).toBeHidden()
// fields should be readOnly / disabled // fields should be readOnly / disabled
await expect(page.locator('#field-text')).toBeDisabled() await expect(page.locator('#field-text')).toBeDisabled()