File tree Expand file tree Collapse file tree 2 files changed +254
-202
lines changed
packages/main/src/components/Breadcrumbs Expand file tree Collapse file tree 2 files changed +254
-202
lines changed Original file line number Diff line number Diff line change 1
1
import { createPassThroughPropsTest } from '@shared/tests/utils' ;
2
- import { mount } from 'enzyme ' ;
2
+ import { render } from '@shared/tests ' ;
3
3
import { Breadcrumbs } from '@ui5/webcomponents-react/lib/Breadcrumbs' ;
4
4
import { BreadcrumbsSeparatorStyle } from '@ui5/webcomponents-react/lib/BreadcrumbsSeparatorStyle' ;
5
5
import { Link } from '@ui5/webcomponents-react/lib/Link' ;
@@ -8,26 +8,26 @@ import React from 'react';
8
8
describe ( 'Breadcrumbs' , ( ) => {
9
9
Object . values ( BreadcrumbsSeparatorStyle ) . forEach ( ( style ) => {
10
10
test ( `separatorStyle: '${ style } '` , ( ) => {
11
- const wrapper = mount (
11
+ const { asFragment } = render (
12
12
< Breadcrumbs separatorStyle = { style } >
13
13
< Link > Link 1</ Link >
14
14
< Link > Link 2</ Link >
15
15
< Link > Link 3</ Link >
16
16
</ Breadcrumbs >
17
17
) ;
18
- expect ( wrapper . render ( ) ) . toMatchSnapshot ( ) ;
18
+ expect ( asFragment ( ) ) . toMatchSnapshot ( ) ;
19
19
} ) ;
20
20
} ) ;
21
21
22
22
test ( 'with currentLocationText' , ( ) => {
23
- const wrapper = mount (
23
+ const { asFragment } = render (
24
24
< Breadcrumbs currentLocationText = "Current Location" >
25
25
< Link > Link 1</ Link >
26
26
< Link > Link 2</ Link >
27
27
< Link > Link 3</ Link >
28
28
</ Breadcrumbs >
29
29
) ;
30
- expect ( wrapper . render ( ) ) . toMatchSnapshot ( ) ;
30
+ expect ( asFragment ( ) ) . toMatchSnapshot ( ) ;
31
31
} ) ;
32
32
33
33
createPassThroughPropsTest ( Breadcrumbs ) ;
You can’t perform that action at this time.
0 commit comments