@@ -210,9 +210,9 @@ describe('Steps', () => {
210
210
] }
211
211
/> ,
212
212
) ;
213
- const items = container . querySelectorAll ( '.rc-steps-item-wrapper ' ) ;
213
+ const items = container . querySelectorAll ( '.rc-steps-item' ) ;
214
214
fireEvent . click ( items [ 1 ] ) ;
215
- expect ( onChange ) . toBeCalledWith ( 1 ) ;
215
+ expect ( onChange ) . toHaveBeenCalledTimes ( 1 ) ;
216
216
} ) ;
217
217
218
218
it ( 'items out of render function' , ( ) => {
@@ -233,7 +233,7 @@ describe('Steps', () => {
233
233
< Steps current = { current } onChange = { onChange } items = { items } key = { current } /> ,
234
234
) ;
235
235
236
- const step = container . querySelectorAll ( '.rc-steps-item-wrapper ' ) [ 1 ] ;
236
+ const step = container . querySelectorAll ( '.rc-steps-item' ) [ 1 ] ;
237
237
fireEvent . click ( step ) ;
238
238
rerender ( < Steps current = { current } onChange = { onChange } items = { items } key = { current } /> ) ;
239
239
expect ( container . querySelectorAll ( '.rc-steps-item' ) [ 1 ] . classList ) . toContain (
@@ -265,7 +265,7 @@ describe('Steps', () => {
265
265
/> ,
266
266
) ;
267
267
268
- const btn = container . querySelectorAll ( '.rc-steps-item-wrapper ' ) [ 0 ] ;
268
+ const btn = container . querySelectorAll ( '.rc-steps-item' ) [ 0 ] ;
269
269
fireEvent . click ( btn ) ;
270
270
expect ( onClick ) . toHaveBeenCalled ( ) ;
271
271
} ) ;
@@ -276,7 +276,7 @@ describe('Steps', () => {
276
276
< Steps onChange = { onChange } items = { [ { } , { } , { disabled : true } ] } /> ,
277
277
) ;
278
278
279
- const items = container . querySelectorAll ( '.rc-steps-item-wrapper ' ) ;
279
+ const items = container . querySelectorAll ( '.rc-steps-item' ) ;
280
280
fireEvent . click ( items [ 2 ] ) ;
281
281
expect ( onChange ) . not . toBeCalled ( ) ;
282
282
} ) ;
0 commit comments