@@ -89,7 +89,7 @@ describe('SearchDropdown', function() {
8989
9090 it ( 'should not be spinner if loading and there is non-empty result' , function ( ) {
9191 const fetch = sinon . spy ( ( ) => Promise . resolve ( [ ] ) ) ;
92- const searchDropdown = mount ( < SearchDropdown fetch = { fetch } items = { [ 'one' ] } /> ) ;
92+ const searchDropdown = mount ( < SearchDropdown fetch = { fetch } initialItems = { [ 'one' ] } /> ) ;
9393
9494 searchDropdown . find ( '.pivot' ) . simulate ( 'click' ) ; // open dropdown
9595 searchDropdown . find ( '.searchBarInput' ) . simulate ( 'change' , { target : { value : 'foo' } } ) ; // type `foo`
@@ -100,7 +100,7 @@ describe('SearchDropdown', function() {
100100
101101 it ( 'should render value as displayText if no items with that value and no displayText' , function ( ) {
102102 const value = 'arfglauefah' ;
103- const searchDropdown = mount ( < SearchDropdown value = { value } /> ) ;
103+ const searchDropdown = mount ( < SearchDropdown initialValue = { value } /> ) ;
104104
105105 expect ( searchDropdown . find ( '.pivot' ) . text ( ) ) . to . equal ( value ) ;
106106 } ) ;
@@ -109,14 +109,14 @@ describe('SearchDropdown', function() {
109109 const value = 'val2' ;
110110 const displayText = 'displayText2' ;
111111 const items = [ [ 'val1' , 'displayText1' ] , [ 'val2' , displayText ] ] ;
112- const searchDropdown = mount ( < SearchDropdown items = { items } value = { value } /> ) ;
112+ const searchDropdown = mount ( < SearchDropdown initialItems = { items } initialValue = { value } /> ) ;
113113
114114 expect ( searchDropdown . find ( '.pivot' ) . text ( ) ) . to . equal ( displayText ) ;
115115 } ) ;
116116
117117 it ( 'should use renderItem to display value if passed and value exists' , function ( ) {
118118 const displayText = 'bfkyrgfoaui' ;
119- const searchDropdown = mount ( < SearchDropdown value = "value" renderItem = { ( ) => displayText } /> ) ;
119+ const searchDropdown = mount ( < SearchDropdown initialValue = "value" renderItem = { ( ) => displayText } /> ) ;
120120
121121 expect ( searchDropdown . find ( '.pivot' ) . text ( ) ) . to . equal ( displayText ) ;
122122 } ) ;
@@ -131,7 +131,7 @@ describe('SearchDropdown', function() {
131131
132132 it ( 'should close dropdown after clicking the same item second time' , function ( ) {
133133 const items = [ 'val1' , 'val2' ] ;
134- const searchDropdown = mount ( < SearchDropdown items = { items } /> ) ;
134+ const searchDropdown = mount ( < SearchDropdown initialItems = { items } /> ) ;
135135
136136 searchDropdown . find ( '.pivot' ) . simulate ( 'click' ) ; // open
137137 expect ( searchDropdown . state ( 'open' ) ) . to . be . true ;
0 commit comments