@@ -46,8 +46,8 @@ describe('simple table interactions', () => {
4646 // click last page
4747 cy . getByTestID ( 'pagination-item' ) . last ( ) . should ( 'be.visible' )
4848 cy . getByTestID ( 'pagination-item' ) . last ( ) . click ( )
49- // verify correct number of pages
50- cy . getByTestID ( 'pagination-item' ) . last ( ) . contains ( '50 ' )
49+ // verify correct number of pages: 300 items at 3 items per page
50+ cy . getByTestID ( 'pagination-item' ) . last ( ) . contains ( '100 ' )
5151
5252 // show raw data view of data with 10 pages
5353 cy . getByTestID ( `selector-list ${ simpleSmall } ` ) . should ( 'be.visible' )
@@ -74,7 +74,7 @@ describe('simple table interactions', () => {
7474 } )
7575 // verify correct number of pages
7676 cy . getByTestID ( 'pagination-item' ) . last ( ) . should ( 'be.visible' )
77- cy . getByTestID ( 'pagination-item' ) . last ( ) . contains ( '15 ' )
77+ cy . getByTestID ( 'pagination-item' ) . last ( ) . contains ( '10 ' )
7878 } )
7979
8080 it ( 'should render correctly after switching from a dataset with fewer pages to one with more' , ( ) => {
@@ -101,7 +101,7 @@ describe('simple table interactions', () => {
101101 cy . getByTestID ( 'pagination-item' ) . last ( ) . should ( 'be.visible' )
102102 cy . getByTestID ( 'pagination-item' ) . last ( ) . click ( )
103103 // verify correct number of pages
104- cy . getByTestID ( 'pagination-item' ) . last ( ) . contains ( '5 ' )
104+ cy . getByTestID ( 'pagination-item' ) . last ( ) . contains ( '10 ' )
105105
106106 // show raw data view of data with 100 pages
107107 cy . getByTestID ( `selector-list ${ simpleLarge } ` ) . should ( 'be.visible' )
@@ -128,7 +128,7 @@ describe('simple table interactions', () => {
128128 } )
129129 // verify correct number of pages
130130 cy . getByTestID ( 'pagination-item' ) . last ( ) . should ( 'be.visible' )
131- cy . getByTestID ( 'pagination-item' ) . last ( ) . contains ( '150 ' )
131+ cy . getByTestID ( 'pagination-item' ) . last ( ) . contains ( '100 ' )
132132 } )
133133
134134 it ( 'should not duplicate records from the n-1 page on the nth page' , ( ) => {
@@ -155,7 +155,7 @@ describe('simple table interactions', () => {
155155 cy . getByTestID ( 'pagination-item' ) . last ( ) . should ( 'be.visible' )
156156 cy . getByTestID ( 'pagination-item' ) . last ( ) . click ( )
157157 // verify correct number of pages
158- cy . getByTestID ( 'pagination-item' ) . last ( ) . contains ( '6 ' )
158+ cy . getByTestID ( 'pagination-item' ) . last ( ) . contains ( '11 ' )
159159 // verify only record 31 is on last page
160160 cy . getByTestID ( 'table-cell 30' ) . should ( 'not.exist' )
161161 cy . getByTestID ( 'table-cell 31' ) . should ( 'be.visible' )
@@ -185,32 +185,37 @@ describe('simple table interactions', () => {
185185 cy . getByTestID ( 'pagination-item' ) . last ( ) . should ( 'be.visible' )
186186 cy . getByTestID ( 'pagination-item' ) . last ( ) . click ( )
187187
188- // click page 15
188+ // click page 10
189189 cy . getByTestID ( 'pagination-item' ) . eq ( 4 ) . click ( )
190+ cy . getByTestID ( 'table-cell 28' ) . should ( 'be.visible' )
190191 cy . getByTestID ( 'table-cell 29' ) . should ( 'be.visible' )
191192 cy . getByTestID ( 'table-cell 30' ) . should ( 'be.visible' )
192193 cy . getByTestID ( 'pagination-item' ) . last ( ) . click ( )
193194
194- // click page 14
195+ // click page 9
195196 cy . getByTestID ( 'pagination-item' ) . eq ( 3 ) . click ( )
197+ cy . getByTestID ( 'table-cell 25' ) . should ( 'be.visible' )
198+ cy . getByTestID ( 'table-cell 26' ) . should ( 'be.visible' )
196199 cy . getByTestID ( 'table-cell 27' ) . should ( 'be.visible' )
197- cy . getByTestID ( 'table-cell 28' ) . should ( 'be.visible' )
198200 cy . getByTestID ( 'pagination-item' ) . last ( ) . click ( )
199201
200- // click page 13
202+ // click page 8
201203 cy . getByTestID ( 'pagination-item' ) . eq ( 2 ) . click ( )
202- cy . getByTestID ( 'table-cell 25' ) . should ( 'be.visible' )
203- cy . getByTestID ( 'table-cell 26' ) . should ( 'be.visible' )
204+ cy . getByTestID ( 'table-cell 22' ) . should ( 'be.visible' )
205+ cy . getByTestID ( 'table-cell 23' ) . should ( 'be.visible' )
206+ cy . getByTestID ( 'table-cell 24' ) . should ( 'be.visible' )
204207 cy . getByTestID ( 'pagination-item' ) . last ( ) . click ( )
205208
206- // click page 12
209+ // click page 7
207210 cy . getByTestID ( 'pagination-item' ) . eq ( 1 ) . click ( )
208- cy . getByTestID ( 'table-cell 23' ) . should ( 'be.visible' )
209- cy . getByTestID ( 'table-cell 24' ) . should ( 'be.visible' )
211+ cy . getByTestID ( 'table-cell 19' ) . should ( 'be.visible' )
212+ cy . getByTestID ( 'table-cell 20' ) . should ( 'be.visible' )
213+ cy . getByTestID ( 'table-cell 21' ) . should ( 'be.visible' )
210214 cy . getByTestID ( 'pagination-item' ) . last ( ) . click ( )
211215
212216 // click left button
213217 cy . getByTestID ( 'pagination-direction-item' ) . eq ( 0 ) . click ( )
218+ cy . getByTestID ( 'table-cell 28' ) . should ( 'be.visible' )
214219 cy . getByTestID ( 'table-cell 29' ) . should ( 'be.visible' )
215220 cy . getByTestID ( 'table-cell 30' ) . should ( 'be.visible' )
216221 } )
0 commit comments