File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 45
45
"@babel/runtime" : " ^7.12.5" ,
46
46
"array-tree-filter" : " ^2.1.0" ,
47
47
"classnames" : " ^2.3.1" ,
48
- "rc-select" : " ~14.13 .0" ,
48
+ "rc-select" : " ~14.14 .0" ,
49
49
"rc-tree" : " ~5.8.1" ,
50
50
"rc-util" : " ^5.37.0"
51
51
},
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import Cascader from '../src';
6
6
import { addressOptions , addressOptionsForUneven , optionsForActiveMenuItems } from './demoOptions' ;
7
7
import { mount } from './enzyme' ;
8
8
import { toRawValues } from '../src/utils/commonUtil' ;
9
+ import { render } from '@testing-library/react' ;
9
10
10
11
describe ( 'Cascader.Basic' , ( ) => {
11
12
let selectedValue : any ;
@@ -1065,4 +1066,10 @@ describe('Cascader.Basic', () => {
1065
1066
it ( 'toRawValues undefined' , ( ) => {
1066
1067
expect ( toRawValues ( ) ) . toEqual ( [ ] ) ;
1067
1068
} ) ;
1069
+
1070
+ it ( 'nativeElement' , ( ) => {
1071
+ const cascaderRef = React . createRef < CascaderRef > ( ) ;
1072
+ const { container } = render ( < Cascader ref = { cascaderRef } /> ) ;
1073
+ expect ( cascaderRef . current ?. nativeElement ) . toEqual ( container . querySelector ( '.rc-cascader' ) ) ;
1074
+ } ) ;
1068
1075
} ) ;
You can’t perform that action at this time.
0 commit comments