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 4545 "@babel/runtime" : " ^7.12.5" ,
4646 "array-tree-filter" : " ^2.1.0" ,
4747 "classnames" : " ^2.3.1" ,
48- "rc-select" : " ~14.13 .0" ,
48+ "rc-select" : " ~14.14 .0" ,
4949 "rc-tree" : " ~5.8.1" ,
5050 "rc-util" : " ^5.37.0"
5151 },
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import Cascader from '../src';
66import { addressOptions , addressOptionsForUneven , optionsForActiveMenuItems } from './demoOptions' ;
77import { mount } from './enzyme' ;
88import { toRawValues } from '../src/utils/commonUtil' ;
9+ import { render } from '@testing-library/react' ;
910
1011describe ( 'Cascader.Basic' , ( ) => {
1112 let selectedValue : any ;
@@ -1065,4 +1066,10 @@ describe('Cascader.Basic', () => {
10651066 it ( 'toRawValues undefined' , ( ) => {
10661067 expect ( toRawValues ( ) ) . toEqual ( [ ] ) ;
10671068 } ) ;
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+ } ) ;
10681075} ) ;
You can’t perform that action at this time.
0 commit comments