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
8 changes: 4 additions & 4 deletions src/tests/views/FilesList/FilesList.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ describe('FilesList.vue rendering rules', () => {
await flushPromises()

expect(wrapper.vm.mdiFolder).toBeTruthy()
expect(wrapper.vm.mdiViewGrid).toBeTruthy()
expect(wrapper.vm.mdiViewList).toBeTruthy()
expect(wrapper.vm.mdiViewGridOutline).toBeTruthy()
expect(wrapper.vm.mdiFormatListBulletedSquare).toBeTruthy()
expect(wrapper.vm.mdiChevronDown).toBeTruthy()
expect(wrapper.vm.mdiChevronUp).toBeTruthy()
expect(wrapper.vm.mdiReload).toBeTruthy()
Expand Down Expand Up @@ -265,7 +265,7 @@ describe('FilesList.vue rendering rules', () => {

const gridButton = wrapper.find('.files-list__header-grid-button')
const iconWithPath = gridButton.findAll('.nc-icon').find((node) => !!node.attributes('data-path'))
expect(iconWithPath?.attributes('data-path')).toBe(wrapper.vm.mdiViewGrid)
expect(iconWithPath?.attributes('data-path')).toBe(wrapper.vm.mdiViewGridOutline)
})

it('renders list toggle icon path when in grid mode', async () => {
Expand All @@ -279,6 +279,6 @@ describe('FilesList.vue rendering rules', () => {

const gridButton = wrapper.find('.files-list__header-grid-button')
const iconWithPath = gridButton.findAll('.nc-icon').find((node) => !!node.attributes('data-path'))
expect(iconWithPath?.attributes('data-path')).toBe(wrapper.vm.mdiViewList)
expect(iconWithPath?.attributes('data-path')).toBe(wrapper.vm.mdiFormatListBulletedSquare)
})
})
12 changes: 6 additions & 6 deletions src/views/FilesList/FilesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
variant="tertiary"
@click="toggleGridView">
<template #icon>
<NcIconSvgWrapper v-if="userConfigStore.files_list_grid_view" :path="mdiViewList" />
<NcIconSvgWrapper v-else :path="mdiViewGrid" />
<NcIconSvgWrapper v-if="userConfigStore.files_list_grid_view" :path="mdiFormatListBulletedSquare" />
<NcIconSvgWrapper v-else :path="mdiViewGridOutline" />
</template>
</NcButton>
</div>
Expand Down Expand Up @@ -96,9 +96,9 @@ import {
mdiChevronDown,
mdiChevronUp,
mdiFolder,
mdiFormatListBulletedSquare,
mdiReload,
mdiViewGrid,
mdiViewList,
mdiViewGridOutline,
} from '@mdi/js'

import NcActionButton from '@nextcloud/vue/components/NcActionButton'
Expand Down Expand Up @@ -147,9 +147,9 @@ export default {
mdiChevronDown,
mdiChevronUp,
mdiFolder,
mdiFormatListBulletedSquare,
mdiReload,
mdiViewGrid,
mdiViewList,
mdiViewGridOutline,
}
},
data() {
Expand Down
Loading