Skip to content

Commit

Permalink
test(e2e): ensure custom restore action does not appear in `DocumentS…
Browse files Browse the repository at this point in the history
…tatusBarActions` menu
  • Loading branch information
juice49 committed May 21, 2024
1 parent e932cf5 commit 52e091f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/e2e/tests/document-actions/restore.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,19 @@ test(`respects removed restore action`, async ({page, createDraftDocument}) => {
// Ensure the restore button is not displayed.
await expect(restoreButton).not.toBeVisible()
})

test(`user defined restore actions should not appear in any other document action group UI`, async ({
page,
createDraftDocument,
}) => {
const actionMenuButton = page.getByTestId('action-menu-button')
const customRestoreButton = page.getByTestId('action-Customrestore')
const paneContextMenu = page.locator('[data-ui="MenuButton__popover"]')

await createDraftDocument('/test/content/input-debug;documentActionsTest')

await actionMenuButton.click()

await expect(paneContextMenu).toBeVisible()
await expect(customRestoreButton).not.toBeVisible()
})

0 comments on commit 52e091f

Please sign in to comment.