33 * SPDX-License-Identifier: AGPL-3.0-or-later
44 */
55
6- import type { VueWrapper } from '@vue/test-utils'
6+ import type { Wrapper } from '@vue/test-utils'
77import type { ComponentProps } from 'vue-component-type-helpers'
88
99import { afterEach , describe , expect , it , vi } from 'vitest'
@@ -13,25 +13,27 @@ import { shallowMount } from '@vue/test-utils'
1313import FileListRow from './FileListRow.vue'
1414import { nextTick } from 'vue'
1515
16- type SubmitAction = ( wrapper : VueWrapper < any > ) => Promise < void >
16+ /* eslint-disable @typescript-eslint/no-explicit-any, jsdoc/require-jsdoc */
17+
18+ type SubmitAction = ( wrapper : Wrapper < any > ) => Promise < void >
1719type ElementEvent = { 'update:selected' : boolean | undefined , 'enter-directory' : Folder | undefined }
1820
19- async function clickCheckboxAction ( wrapper : VueWrapper < any > ) {
21+ async function clickCheckboxAction ( wrapper : Wrapper < any > ) {
2022 wrapper . find ( 'input[type="checkbox"]' ) . trigger ( 'click' )
2123}
2224
23- async function clickElementAction ( wrapper : VueWrapper < any > ) {
25+ async function clickElementAction ( wrapper : Wrapper < any > ) {
2426 wrapper . find ( '[data-testid="row-name"]' ) . trigger ( 'click' )
2527}
2628
27- async function pressEnterAction ( wrapper : VueWrapper < any > ) {
29+ async function pressEnterAction ( wrapper : Wrapper < any > ) {
2830 wrapper . element . dispatchEvent ( new KeyboardEvent ( 'keydown' , { bubbles : true , key : 'Enter' } ) )
2931 await nextTick ( )
3032}
3133
3234function testSubmitNode ( name : string , propsData : ComponentProps < typeof FileListRow > , eventPayload : ElementEvent , actionCallback : SubmitAction ) {
3335 it ( name , async ( ) => {
34- const wrapper = shallowMount ( FileListRow , {
36+ const wrapper = shallowMount ( FileListRow as any , {
3537 propsData,
3638 stubs : {
3739 NcCheckboxRadioSwitch : {
@@ -113,7 +115,7 @@ describe('FilePicker: FileListRow', () => {
113115 const consoleWarn = vi . spyOn ( console , 'warn' )
114116 const consoleError = vi . spyOn ( console , 'error' )
115117
116- const wrapper = shallowMount ( FileListRow , {
118+ const wrapper = shallowMount ( FileListRow as any , {
117119 propsData : {
118120 allowPickDirectory : true ,
119121 selected : false ,
@@ -134,7 +136,7 @@ describe('FilePicker: FileListRow', () => {
134136 } )
135137
136138 it ( 'shows checkbox based on `showCheckbox` property' , async ( ) => {
137- const wrapper = shallowMount ( FileListRow , {
139+ const wrapper = shallowMount ( FileListRow as any , {
138140 propsData : {
139141 allowPickDirectory : true ,
140142 selected : false ,
0 commit comments