File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,8 @@ beforeEach(() => {
5858 </ div >
5959 ) ;
6060 } ;
61- renderApp = ( options = { } ) => {
61+ renderApp = ( options ) => {
62+ options = options || { } ;
6263 act ( ( ) => {
6364 render ( < App options = { options } > </ App > , container ) ;
6465 } ) ;
@@ -444,13 +445,13 @@ describe('sort method : ', () => {
444445 expect . assertions ( 4 ) ;
445446 renderApp ( ) ;
446447 return act ( ( ) => {
447- const buttons = document . querySelectorAll ( 'button .rc-dyn-tabs-title ' ) ;
448- expect ( buttons [ 0 ] . id ) . toBe ( 'rc-dyn-tabs-l-1' ) ;
449- expect ( buttons [ 1 ] . id ) . toBe ( 'rc-dyn-tabs-l-2' ) ;
448+ const lis = document . querySelectorAll ( 'li .rc-dyn-tabs-tab ' ) ;
449+ expect ( lis [ 0 ] . id ) . toBe ( 'rc-dyn-tabs-l-1' ) ;
450+ expect ( lis [ 1 ] . id ) . toBe ( 'rc-dyn-tabs-l-2' ) ;
450451 return instance . sort ( [ '2' , '1' ] ) . then ( ( ) => {
451- const buttons = document . querySelectorAll ( 'button .rc-dyn-tabs-title ' ) ;
452- expect ( buttons [ 0 ] . id ) . toBe ( 'rc-dyn-tabs-l-2' ) ;
453- expect ( buttons [ 1 ] . id ) . toBe ( 'rc-dyn-tabs-l-1' ) ;
452+ const lis = document . querySelectorAll ( 'li .rc-dyn-tabs-tab ' ) ;
453+ expect ( lis [ 0 ] . id ) . toBe ( 'rc-dyn-tabs-l-2' ) ;
454+ expect ( lis [ 1 ] . id ) . toBe ( 'rc-dyn-tabs-l-1' ) ;
454455 } ) ;
455456 } ) ;
456457 } ) ;
You can’t perform that action at this time.
0 commit comments