File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -110,4 +110,40 @@ describe('simple quick jumper', () => {
110110 expect ( onChange ) . toHaveBeenLastCalledWith ( 2 , 10 ) ;
111111 } ) ;
112112 } ) ;
113+
114+ it ( 'goButton could be true' , ( ) => {
115+ wrapper = mount (
116+ < Pagination
117+ onChange = { onChange }
118+ defaultCurrent = { 10 }
119+ total = { 1000 }
120+ showQuickJumper = { { goButton : true } }
121+ /> ,
122+ ) ;
123+ expect ( wrapper . find ( 'button' ) . exists ( ) ) . toBe ( true ) ;
124+ } ) ;
125+
126+ it ( 'goButton defaultly hidden' , ( ) => {
127+ wrapper = mount (
128+ < Pagination
129+ onChange = { onChange }
130+ defaultCurrent = { 10 }
131+ total = { 1000 }
132+ showQuickJumper
133+ /> ,
134+ ) ;
135+ expect ( wrapper . find ( 'button' ) . exists ( ) ) . toBe ( false ) ;
136+ } ) ;
137+
138+ it ( 'goButton could be false' , ( ) => {
139+ wrapper = mount (
140+ < Pagination
141+ onChange = { onChange }
142+ defaultCurrent = { 10 }
143+ total = { 1000 }
144+ showQuickJumper = { { goButton : false } }
145+ /> ,
146+ ) ;
147+ expect ( wrapper . find ( 'button' ) . exists ( ) ) . toBe ( false ) ;
148+ } ) ;
113149} ) ;
You can’t perform that action at this time.
0 commit comments