Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/files_sharing/src/components/UnifiedShareEntry.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ describe('deleting the share', () => {
describe('removing a participant', () => {
it('removes the recipient of the row it was triggered on', async () => {
const wrapper = mountEntry(share([recipient('bob'), recipient('carol')]))
await triggerAction(wrapper, 'Remove participant')
await triggerAction(wrapper, 'Remove recipient')
expect(removeRecipient).toHaveBeenCalledWith('42', 'UserRecipient', 'bob', null)
expect(wrapper.emitted('refresh')).toHaveLength(1)
})

it('does not refresh when the removal fails', async () => {
vi.mocked(removeRecipient).mockRejectedValueOnce(new Error('nope'))
const wrapper = mountEntry(share([recipient('bob'), recipient('carol')]))
await triggerAction(wrapper, 'Remove participant')
await triggerAction(wrapper, 'Remove recipient')
expect(wrapper.emitted('refresh')).toBeUndefined()
})
})
4 changes: 2 additions & 2 deletions apps/files_sharing/src/components/UnifiedShareEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@
:user="isNoUserRecipient(recipient) ? undefined : recipient.value"
:displayName="recipient.display_name" />
</template>
<NcActionButton :aria-label="t('files_sharing', 'Remove participant')" @click="removeOne(recipient)">
<NcActionButton :aria-label="t('files_sharing', 'Remove recipient')" @click="removeOne(recipient)">
<template #icon>
<DeleteIcon :size="20" />
</template>
{{ t('files_sharing', 'Remove participant') }}
{{ t('files_sharing', 'Remove recipient') }}
</NcActionButton>
</SharingEntrySimple>
</template>
Expand Down
24 changes: 11 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@nextcloud/password-confirmation": "^6.1.0",
"@nextcloud/paths": "^3.1.0",
"@nextcloud/router": "^3.1.0",
"@nextcloud/sharing": "^1.0.0-beta.2",
"@nextcloud/sharing": "^1.0.0-beta.4",
"@nextcloud/vue": "^9.10.0",
"@vueuse/core": "^14.1.0",
"@vueuse/integrations": "^14.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ test.describe('files_sharing: editing a share with the unified dialog', () => {

await expect(menu.getByRole('menuitem', { name: 'Can view (default)' })).toBeVisible()
await expect(menu.getByRole('menuitem', { name: 'Custom permissions' })).toBeVisible()
await expect(menu.getByRole('menuitem', { name: 'Remove participant' })).toBeVisible()
await expect(menu.getByRole('menuitem', { name: 'Remove recipient' })).toBeVisible()
})

test('caps the recipient toggles at the permissions the share grants', async ({ page, recipient, filesListPage, unifiedShareList, sharingDialog }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ test.describe('files_sharing: unified share list in the sidebar', () => {

const removed = page.waitForResponse((response) => response.request().method() === 'DELETE'
&& response.url().includes('/recipient'))
await unifiedShareList.triggerAction(recipient.userId, 'Remove participant')
await unifiedShareList.triggerAction(recipient.userId, 'Remove recipient')
await removed

// One recipient left, so the group collapses into a plain row.
Expand Down
Loading