@@ -51,7 +51,7 @@ describe('connectNumericSelector', () => {
5151 expect ( rendering . lastCall . args [ 1 ] ) . toBe ( true ) ;
5252
5353 const firstRenderingOptions = rendering . lastCall . args [ 0 ] ;
54- expect ( firstRenderingOptions . currentValue ) . toBe ( listOptions [ 0 ] . value ) ;
54+ expect ( firstRenderingOptions . currentRefinement ) . toBe ( listOptions [ 0 ] . value ) ;
5555 expect ( firstRenderingOptions . widgetParams ) . toEqual ( {
5656 attributeName : 'numerics' ,
5757 options : listOptions ,
@@ -69,7 +69,7 @@ describe('connectNumericSelector', () => {
6969 expect ( rendering . lastCall . args [ 1 ] ) . toBe ( false ) ;
7070
7171 const secondRenderingOptions = rendering . lastCall . args [ 0 ] ;
72- expect ( secondRenderingOptions . currentValue ) . toBe ( listOptions [ 0 ] . value ) ;
72+ expect ( secondRenderingOptions . currentRefinement ) . toBe ( listOptions [ 0 ] . value ) ;
7373 expect ( secondRenderingOptions . widgetParams ) . toEqual ( {
7474 attributeName : 'numerics' ,
7575 options : listOptions ,
@@ -139,13 +139,13 @@ describe('connectNumericSelector', () => {
139139 } ) ;
140140
141141 const firstRenderingOptions = rendering . lastCall . args [ 0 ] ;
142- const { setValue } = firstRenderingOptions ;
142+ const { refine } = firstRenderingOptions ;
143143 expect ( helper . state . getNumericRefinements ( 'numerics' ) ) . toEqual ( { '=' : [ 10 ] } ) ;
144- setValue ( listOptions [ 1 ] . name ) ;
144+ refine ( listOptions [ 1 ] . name ) ;
145145 expect ( helper . state . getNumericRefinements ( 'numerics' ) ) . toEqual ( { '=' : [ 20 ] } ) ;
146- setValue ( listOptions [ 2 ] . name ) ;
146+ refine ( listOptions [ 2 ] . name ) ;
147147 expect ( helper . state . getNumericRefinements ( 'numerics' ) ) . toEqual ( { '=' : [ 30 ] } ) ;
148- setValue ( listOptions [ 0 ] . name ) ;
148+ refine ( listOptions [ 0 ] . name ) ;
149149 expect ( helper . state . getNumericRefinements ( 'numerics' ) ) . toEqual ( { '=' : [ 10 ] } ) ;
150150
151151 widget . render ( {
@@ -156,7 +156,7 @@ describe('connectNumericSelector', () => {
156156 } ) ;
157157
158158 const secondRenderingOptions = rendering . lastCall . args [ 0 ] ;
159- const { setValue : renderSetValue } = secondRenderingOptions ;
159+ const { refine : renderSetValue } = secondRenderingOptions ;
160160 expect ( helper . state . getNumericRefinements ( 'numerics' ) ) . toEqual ( { '=' : [ 10 ] } ) ;
161161 renderSetValue ( listOptions [ 1 ] . name ) ;
162162 expect ( helper . state . getNumericRefinements ( 'numerics' ) ) . toEqual ( { '=' : [ 20 ] } ) ;
@@ -190,12 +190,12 @@ describe('connectNumericSelector', () => {
190190 onHistoryChange : ( ) => { } ,
191191 } ) ;
192192
193- let setValue = rendering . lastCall . args [ 0 ] . setValue ;
193+ let refine = rendering . lastCall . args [ 0 ] . refine ;
194194
195195 listOptions . forEach ( ( _ , i ) => {
196196 // we loop with 1 increment because the first value is selected by default
197197 const currentOption = listOptions [ ( i + 1 ) % listOptions . length ] ;
198- setValue ( currentOption . name ) ;
198+ refine ( currentOption . name ) ;
199199
200200 widget . render ( {
201201 results : new SearchResults ( helper . state , [ { } ] ) ,
@@ -209,9 +209,9 @@ describe('connectNumericSelector', () => {
209209 const expectedResult = currentOption . value ;
210210
211211 const renderingParameters = rendering . lastCall . args [ 0 ] ;
212- expect ( renderingParameters . currentValue ) . toEqual ( expectedResult ) ;
212+ expect ( renderingParameters . currentRefinement ) . toEqual ( expectedResult ) ;
213213
214- setValue = renderingParameters . setValue ;
214+ refine = renderingParameters . refine ;
215215 } ) ;
216216 } ) ;
217217} ) ;
0 commit comments