@@ -12,26 +12,26 @@ describe('Test Input.Match component', () => {
1212 it ( 'Should support searchType' , ( ) => {
1313 const fn = jest . fn ( ) ;
1414 const { rerender, container } = render ( < Match onTypeChange = { fn } /> ) ;
15- const elements = container . querySelectorAll ( 'svg .dtc-input-match-suffixItem' ) ! ;
15+ const elements = container . querySelectorAll ( 'span .dtc-input-match-suffixItem' ) ! ;
1616 expect ( elements ) . toHaveLength ( 4 ) ;
1717
1818 fireEvent . click ( elements [ 0 ] ) ;
1919
2020 expect ( fn ) . toBeCalledWith ( 'caseSensitive' ) ;
2121
2222 rerender ( < Match searchType = "caseSensitive" onTypeChange = { fn } /> ) ;
23- expect ( container . querySelectorAll ( 'svg .dtc-input-match-suffixItem' ) ! ) . toHaveLength ( 4 ) ;
24- expect ( container . querySelectorAll ( 'svg.dtc-input-match-suffixItem' ) [ 0 ] . classList ) . toContain (
25- ' dtc-input-match-suffixItem__active'
26- ) ;
27- fireEvent . click ( container . querySelectorAll ( 'svg .dtc-input-match-suffixItem' ) [ 0 ] ) ;
23+ expect ( container . querySelectorAll ( 'span .dtc-input-match-suffixItem' ) ! ) . toHaveLength ( 4 ) ;
24+ expect (
25+ container . querySelectorAll ( 'span. dtc-input-match-suffixItem' ) [ 0 ] . classList
26+ ) . toContain ( 'dtc-input-match-suffixItem__active' ) ;
27+ fireEvent . click ( container . querySelectorAll ( 'span .dtc-input-match-suffixItem' ) [ 0 ] ) ;
2828 expect ( fn ) . toBeCalledWith ( 'fuzzy' ) ;
2929 } ) ;
3030
3131 it ( 'Should support filterOptions' , ( ) => {
3232 const { container } = render ( < Match filterOptions = { [ 'tail' ] } /> ) ;
3333
34- expect ( container . querySelectorAll ( 'svg .dtc-input-match-suffixItem' ) ! ) . toHaveLength ( 1 ) ;
34+ expect ( container . querySelectorAll ( 'span .dtc-input-match-suffixItem' ) ! ) . toHaveLength ( 1 ) ;
3535 } ) ;
3636
3737 it ( 'Should support onSearch and onPressEnter' , ( ) => {
0 commit comments