diff --git a/.eslintrc.json b/.eslintrc.json
index 4fe1f90c..1015d67a 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,5 +1,5 @@
{
- "extends": ["@nextcloud/eslint-config/typescript"],
+ "extends": ["@nextcloud/eslint-config/vue3"],
"overrides": [
// https://github.com/mysticatea/eslint-plugin-node/issues/248#issuecomment-1052550467
{
@@ -12,4 +12,4 @@
}
}
]
-}
\ No newline at end of file
+}
diff --git a/lib/components/FilePicker/FileList.spec.ts b/lib/components/FilePicker/FileList.spec.ts
index 94e03d67..c8cf6521 100644
--- a/lib/components/FilePicker/FileList.spec.ts
+++ b/lib/components/FilePicker/FileList.spec.ts
@@ -62,7 +62,7 @@ describe('FilePicker FileList', () => {
const consoleWarning = vi.spyOn(console, 'warn')
const wrapper = shallowMount(FileList, {
- propsData: {
+ props: {
currentView: 'files',
multiselect: false,
allowPickDirectory: false,
@@ -80,7 +80,7 @@ describe('FilePicker FileList', () => {
it('header checkbox is not shown if multiselect is `false`', () => {
const wrapper = shallowMount(FileList, {
- propsData: {
+ props: {
currentView: 'files',
multiselect: false,
allowPickDirectory: false,
@@ -95,7 +95,7 @@ describe('FilePicker FileList', () => {
it('header checkbox is shown if multiselect is `true`', async () => {
const wrapper = shallowMount(FileList, {
- propsData: {
+ props: {
currentView: 'files',
multiselect: true,
allowPickDirectory: false,
@@ -108,18 +108,18 @@ describe('FilePicker FileList', () => {
await nextTick()
- const selectAll = wrapper.find('[data-testid="select-all-checkbox"]')
+ const selectAll = wrapper.getComponent('[data-testid="select-all-checkbox"]')
expect(selectAll.exists()).toBe(true)
// there is an aria label
expect(selectAll.props('ariaLabel')).toBeTruthy()
// no checked
- expect(selectAll.props('checked')).toBe(false)
+ expect(selectAll.props('modelValue')).toBe(false)
})
it('header checkbox is checked when all nodes are selected', async () => {
const nodes = [...exampleNodes]
const wrapper = shallowMount(FileList, {
- propsData: {
+ props: {
currentView: 'files',
multiselect: true,
allowPickDirectory: false,
@@ -130,15 +130,15 @@ describe('FilePicker FileList', () => {
},
})
- const selectAll = wrapper.find('[data-testid="select-all-checkbox"]')
- expect(selectAll.props('checked')).toBe(true)
+ const selectAll = wrapper.getComponent('[data-testid="select-all-checkbox"]')
+ expect(selectAll.props('modelValue')).toBe(true)
})
describe('file list sorting', () => {
it('is sorted initially by name', async () => {
const nodes = [...exampleNodes]
const wrapper = mount(FileList, {
- propsData: {
+ props: {
currentView: 'files',
multiselect: true,
allowPickDirectory: false,
@@ -169,7 +169,7 @@ describe('FilePicker FileList', () => {
it('can sort descending by name', async () => {
const nodes = [...exampleNodes]
const wrapper = mount(FileList, {
- propsData: {
+ props: {
currentView: 'files',
multiselect: true,
allowPickDirectory: false,
diff --git a/lib/components/FilePicker/FileList.vue b/lib/components/FilePicker/FileList.vue
index f60fa6ba..16aad1e2 100644
--- a/lib/components/FilePicker/FileList.vue
+++ b/lib/components/FilePicker/FileList.vue
@@ -13,9 +13,9 @@