@@ -16,7 +16,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
1616 . each ( ( $child , index ) => expect ( $child . text ( ) ) . to . eq ( rootGridTitles [ index ] ) ) ;
1717 } ) ;
1818
19- it ( 'should row detail height to 8 rows and change server delay to 40ms for faster testing' , ( ) => {
19+ it ( 'should set row detail height to 8 rows and change server delay to 40ms for faster testing' , ( ) => {
2020 cy . get ( '[data-test="detail-view-row-count"]' ) . clear ( ) . type ( '8' ) ;
2121 cy . get ( '[data-test="set-count-btn"]' ) . click ( ) ;
2222 cy . get ( '[data-test="server-delay"]' ) . type ( '{backspace}' ) ;
@@ -25,7 +25,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
2525 it ( 'should open the Row Detail of the 2nd row and expect to find an inner grid with all inner column titles' , ( ) => {
2626 cy . get ( '.slick-cell.detail-view-toggle:nth(1)' ) . click ( ) . wait ( 40 ) ;
2727
28- cy . get ( '.slick-cell + .dynamic-cell-detail' ) . find ( 'h4' ) . should ( 'contain' , ` - Order Details (id: ${ 1 } )` ) ;
28+ cy . get ( '.slick-cell + .dynamic-cell-detail' ) . find ( 'h4' ) . should ( 'contain' , ' - Order Details (id: 1)' ) ;
2929
3030 cy . get ( '#innergrid-1' )
3131 . find ( '.slick-header-columns' )
@@ -35,12 +35,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
3535
3636 it ( 'should sort 2nd Row Detail inner grid "Freight" column in ascending order and filter "Ship City" with "m" and expect 2 sorted rows' , ( ) => {
3737 cy . get ( '#grid45 .slick-viewport-top.slick-viewport-left' ) . first ( ) . scrollTo ( 0 , 0 ) ;
38- cy . get ( '#innergrid-1' )
39- . find ( '.slick-header-column:nth(2)' )
40- . trigger ( 'mouseover' )
41- . children ( '.slick-header-menu-button' )
42- . invoke ( 'show' )
43- . click ( ) ;
38+ cy . get ( '#innergrid-1' ) . find ( '.slick-header-column:nth(2)' ) . children ( '.slick-header-menu-button' ) . click ( ) ;
4439
4540 cy . get ( '#innergrid-1 .slick-header-menu .slick-menu-command-list' )
4641 . should ( 'be.visible' )
@@ -132,12 +127,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
132127
133128 cy . get ( '.slick-cell + .dynamic-cell-detail' ) . find ( 'h4' ) . should ( 'contain' , `- Order Details (id: ${ 1 } )` ) ;
134129
135- cy . get ( '#innergrid-1' )
136- . find ( '.slick-header-column:nth(2)' )
137- . trigger ( 'mouseover' )
138- . children ( '.slick-header-menu-button' )
139- . invoke ( 'show' )
140- . click ( ) ;
130+ cy . get ( '#innergrid-1' ) . find ( '.slick-header-column:nth(2)' ) . children ( '.slick-header-menu-button' ) . click ( ) ;
141131
142132 cy . get ( '#innergrid-1 .slick-header-menu .slick-menu-command-list' )
143133 . should ( 'be.visible' )
@@ -181,12 +171,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
181171
182172 cy . get ( '.slick-cell + .dynamic-cell-detail' ) . find ( 'h4' ) . should ( 'contain' , `- Order Details (id: ${ 1 } )` ) ;
183173
184- cy . get ( '#innergrid-1' )
185- . find ( '.slick-header-column:nth(2)' )
186- . trigger ( 'mouseover' )
187- . children ( '.slick-header-menu-button' )
188- . invoke ( 'show' )
189- . click ( ) ;
174+ cy . get ( '#innergrid-1' ) . find ( '.slick-header-column:nth(2)' ) . children ( '.slick-header-menu-button' ) . click ( ) ;
190175
191176 cy . get ( '#innergrid-1 .slick-header-menu .slick-menu-command-list' )
192177 . should ( 'be.visible' )
@@ -235,12 +220,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
235220
236221 cy . get ( '.slick-cell + .dynamic-cell-detail' ) . find ( 'h4' ) . should ( 'contain' , `- Order Details (id: ${ 1 } )` ) ;
237222
238- cy . get ( '#innergrid-1' )
239- . find ( '.slick-header-column:nth(2)' )
240- . trigger ( 'mouseover' )
241- . children ( '.slick-header-menu-button' )
242- . invoke ( 'show' )
243- . click ( ) ;
223+ cy . get ( '#innergrid-1' ) . find ( '.slick-header-column:nth(2)' ) . children ( '.slick-header-menu-button' ) . click ( ) ;
244224
245225 cy . get ( '#innergrid-1 .slick-header-menu .slick-menu-command-list' )
246226 . should ( 'be.visible' )
@@ -264,11 +244,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
264244
265245 cy . get ( '.slick-cell + .dynamic-cell-detail' ) . find ( 'h4' ) . should ( 'contain' , `- Order Details (id: ${ 2 } )` ) ;
266246
267- cy . get ( '#innergrid-2 .slick-header-column:nth(2)' )
268- . trigger ( 'mouseover' )
269- . children ( '.slick-header-menu-button' )
270- . invoke ( 'show' )
271- . click ( ) ;
247+ cy . get ( '#innergrid-2 .slick-header-column:nth(2)' ) . children ( '.slick-header-menu-button' ) . click ( ) ;
272248
273249 cy . get ( '#innergrid-2 .slick-header-menu .slick-menu-command-list' )
274250 . should ( 'be.visible' )
@@ -289,10 +265,11 @@ describe('Example 45 - Row Detail with inner Grid', () => {
289265
290266 it ( 'should go to the bottom end of the grid and open row 987' , ( ) => {
291267 cy . get ( '#grid45' ) . type ( '{ctrl}{end}' , { release : false } ) ;
292- cy . wait ( 50 ) ;
293268 cy . get ( '.slick-row[data-row=1001] .detail-view-toggle' ) . first ( ) . click ( ) ;
294269
295- cy . get ( '#innergrid-987 .search-filter.filter-orderId' ) . clear ( ) . type ( '>987' ) ;
270+ cy . get ( '#innergrid-987 .search-filter.filter-orderId' ) . as ( 'orderIdSearch' ) ;
271+ cy . get ( '@orderIdSearch' ) . clear ( ) ;
272+ cy . get ( '@orderIdSearch' ) . type ( '>987' ) ;
296273 cy . get ( '.slick-empty-data-warning' ) . should ( 'be.visible' ) ;
297274 } ) ;
298275
@@ -315,7 +292,9 @@ describe('Example 45 - Row Detail with inner Grid', () => {
315292 it ( 'should go back to the bottom of the grid and still expect row detail 987 to be opened with same filter and no rows inside it' , ( ) => {
316293 cy . get ( '#grid45' ) . type ( '{ctrl}{end}' , { release : false } ) ;
317294
318- cy . get ( '#innergrid-987 .search-filter.filter-orderId' ) . clear ( ) . type ( '>987' ) ;
295+ cy . get ( '#innergrid-987 .search-filter.filter-orderId' ) . as ( 'orderIdSearch' ) ;
296+ cy . get ( '@orderIdSearch' ) . clear ( ) ;
297+ cy . get ( '@orderIdSearch' ) . type ( '>987' ) ;
319298 cy . get ( '.slick-empty-data-warning' ) . should ( 'be.visible' ) ;
320299 } ) ;
321300
@@ -351,7 +330,9 @@ describe('Example 45 - Row Detail with inner Grid', () => {
351330 it ( 'should change Row Detail panel height to 15, open 2nd and 3rd then execute PageDown twice' , ( ) => {
352331 ROW_DETAIL_PANEL_COUNT = 15 ;
353332 cy . get ( '[data-test="collapse-all-btn"]' ) . click ( ) ;
354- cy . get ( '[data-test="detail-view-row-count"]' ) . clear ( ) . type ( '15' ) ;
333+ cy . get ( '[data-test="detail-view-row-count"]' ) . as ( 'rowCount' ) ;
334+ cy . get ( '@rowCount' ) . clear ( ) ;
335+ cy . get ( '@rowCount' ) . type ( '15' ) ;
355336 cy . get ( '[data-test="set-count-btn"]' ) . click ( ) ;
356337
357338 cy . get ( '.slick-cell.detail-view-toggle:nth(1)' ) . click ( ) . wait ( 40 ) ;
@@ -363,9 +344,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
363344 cy . get ( `#innergrid-1 [style="top: ${ GRID_ROW_HEIGHT * 1 } px;"] > .slick-cell:nth(1)` ) . should ( 'contain' , 'München' ) ;
364345
365346 // open 3rd row detail
366- cy . get ( `.slick-row[data-row="${ ROW_DETAIL_PANEL_COUNT - 1 } "] .slick-cell:nth(0)` )
367- . click ( )
368- . wait ( 40 ) ;
347+ cy . get ( `.slick-row[data-row="14"] .slick-cell:nth(0)` ) . click ( ) . wait ( 40 ) ;
369348
370349 // 3rd row detail
371350 cy . get ( `#innergrid-2 [style="top: ${ GRID_ROW_HEIGHT * 0 } px;"] > .slick-cell:nth(0)` ) . should ( 'contain' , '10281' ) ;
@@ -393,7 +372,9 @@ describe('Example 45 - Row Detail with inner Grid', () => {
393372 it ( 'should change Row Detail panel height back to 8, open 2nd and 3rd and filter Company ID with "1..2" and expect only these 2 rows to be rendered in the grid' , ( ) => {
394373 ROW_DETAIL_PANEL_COUNT = 8 ;
395374 cy . get ( '[data-test="collapse-all-btn"]' ) . click ( ) ;
396- cy . get ( '[data-test="detail-view-row-count"]' ) . clear ( ) . type ( '8' ) ;
375+ cy . get ( '[data-test="detail-view-row-count"]' ) . as ( 'rowCount' ) ;
376+ cy . get ( '@rowCount' ) . clear ( ) ;
377+ cy . get ( '@rowCount' ) . type ( '8' ) ;
397378 cy . get ( '[data-test="set-count-btn"]' ) . click ( ) ;
398379
399380 cy . get ( '.slick-cell.detail-view-toggle:nth(1)' ) . click ( ) . wait ( 40 ) ;
0 commit comments