@@ -421,21 +421,12 @@ describe('simple Pagination', () => {
421421 const container = document . createElement ( 'div' ) ;
422422 document . body . appendChild ( container ) ;
423423
424- let current = 1 ;
425- let pageSize ;
426- function onChange ( page , pSize ) {
427- current = page ;
428- pageSize = pSize ;
429- }
430-
431424 beforeEach ( ( done ) => {
432425 ReactDOM . render (
433426 < Pagination
434427 simple
435- onChange = { onChange }
436428 defaultCurrent = { 1 }
437429 total = { 25 }
438- showQuickJumper = { { goButton : < button > go</ button > } }
439430 showTotal = { ( total , range ) => `${ range [ 0 ] } - ${ range [ 1 ] } of ${ total } items` }
440431 /> ,
441432 container ,
@@ -465,6 +456,50 @@ describe('simple Pagination', () => {
465456 expect ( prevButton . getAttribute ( 'aria-disabled' ) ) . to . equal ( 'true' ) ;
466457 } ) ;
467458
459+ it ( 'no quick jump' , ( ) => {
460+ const simplePagers = TestUtils . scryRenderedDOMComponentsWithClass (
461+ pagination ,
462+ 'rc-pagination-simple-pager'
463+ ) ;
464+ expect ( simplePagers . length ) . to . be ( 1 ) ;
465+ } ) ;
466+ } ) ;
467+
468+
469+ describe ( 'simple Pagination with quick jump' , ( ) => {
470+ let pagination = null ;
471+ const container = document . createElement ( 'div' ) ;
472+ document . body . appendChild ( container ) ;
473+
474+ let current = 1 ;
475+ let pageSize ;
476+ function onChange ( page , pSize ) {
477+ current = page ;
478+ pageSize = pSize ;
479+ }
480+
481+ beforeEach ( ( done ) => {
482+ ReactDOM . render (
483+ < Pagination
484+ simple
485+ onChange = { onChange }
486+ defaultCurrent = { 1 }
487+ total = { 25 }
488+ showQuickJumper = { { goButton : < button > go</ button > } }
489+ showTotal = { ( total , range ) => `${ range [ 0 ] } - ${ range [ 1 ] } of ${ total } items` }
490+ /> ,
491+ container ,
492+ function ( ) {
493+ pagination = this ;
494+ done ( ) ;
495+ } ,
496+ ) ;
497+ } ) ;
498+
499+ afterEach ( ( ) => {
500+ ReactDOM . unmountComponentAtNode ( container ) ;
501+ } ) ;
502+
468503 it ( 'should quick jump to expect page' , ( done ) => {
469504 const quickJumper = TestUtils . findRenderedDOMComponentWithClass (
470505 pagination ,
0 commit comments