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
2 changes: 1 addition & 1 deletion packages/web-app-files/src/views/shares/SharedWithMe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ const fileOwners = computed(() => {
.filter((i) => i.sharedBy)
.map((i) => i.sharedBy)
.flat()
return [...new Map(flatList.map((item) => [item.displayName, item])).values()]
return [...new Map(flatList.map((item) => [item.id, item])).values()]
})

let loadResourcesEventToken: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,26 @@ describe('SharedWithMe view', () => {
expect(wrapper.find('.shared-by-filter').exists()).toBeTruthy()
expect(filterItems).toEqual([collaborator1, collaborator2])
})
it('lists collaborators with the same display name separately', () => {
const collaborator1 = { id: 'user1', displayName: 'Twin' }
const collaborator2 = { id: 'user2', displayName: 'Twin' }
const { wrapper } = getMountedWrapper({
files: [
mock<IncomingShareResource>({
sharedBy: [collaborator1],
shareTypes: [ShareTypes.user.value]
}),
mock<IncomingShareResource>({
sharedBy: [collaborator2, collaborator1],
shareTypes: [ShareTypes.user.value]
})
]
})
const filterItems = wrapper
.findComponent<typeof ItemFilter>('.shared-by-filter')
.props('items')
expect(filterItems).toEqual([collaborator1, collaborator2])
})
})
describe('search', () => {
it('shows filter', () => {
Expand Down
Loading