@@ -4,7 +4,7 @@ import { MockProxy, mock } from 'vitest-mock-extended'
4
4
import { join } from 'path'
5
5
import { defaultComponentMocks , defaultPlugins , shallowMount } from 'web-test-helpers'
6
6
import { OcButton } from 'design-system/src/components'
7
- import { RouteLocationNormalizedLoaded } from 'vue-router'
7
+ import { RouteLocationNamedRaw , RouteLocationNormalizedLoaded } from 'vue-router'
8
8
9
9
const selectors = {
10
10
homeButton : '#files-list-not-found-button-go-home' ,
@@ -43,8 +43,9 @@ describe('NotFoundMessage', () => {
43
43
const { wrapper } = getWrapper ( space , spacesLocation )
44
44
const homeButton = wrapper . findComponent < typeof OcButton > ( selectors . homeButton )
45
45
46
- expect ( homeButton . props ( ) . to . name ) . toBe ( spacesLocation . name )
47
- expect ( homeButton . props ( ) . to . params . driveAliasAndItem ) . toBe ( 'personal' )
46
+ const routeLocation = homeButton . props ( 'to' ) as RouteLocationNamedRaw
47
+ expect ( routeLocation . name ) . toBe ( spacesLocation . name )
48
+ expect ( routeLocation . params . driveAliasAndItem ) . toBe ( 'personal' )
48
49
} )
49
50
} )
50
51
@@ -79,8 +80,9 @@ describe('NotFoundMessage', () => {
79
80
const { wrapper } = getWrapper ( space , publicLocation )
80
81
const reloadLinkButton = wrapper . findComponent < typeof OcButton > ( selectors . reloadLinkButton )
81
82
82
- expect ( reloadLinkButton . props ( ) . to . name ) . toBe ( publicLocation . name )
83
- expect ( reloadLinkButton . props ( ) . to . params . driveAliasAndItem ) . toBe (
83
+ const routeLocation = reloadLinkButton . props ( 'to' ) as RouteLocationNamedRaw
84
+ expect ( routeLocation . name ) . toBe ( publicLocation . name )
85
+ expect ( routeLocation . params . driveAliasAndItem ) . toBe (
84
86
space . getDriveAliasAndItem ( { path : '' } as Resource )
85
87
)
86
88
} )
0 commit comments