@@ -16,7 +16,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
16
16
. each ( ( $child , index ) => expect ( $child . text ( ) ) . to . eq ( rootGridTitles [ index ] ) ) ;
17
17
} ) ;
18
18
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' , ( ) => {
20
20
cy . get ( '[data-test="detail-view-row-count"]' ) . clear ( ) . type ( '8' ) ;
21
21
cy . get ( '[data-test="set-count-btn"]' ) . click ( ) ;
22
22
cy . get ( '[data-test="server-delay"]' ) . type ( '{backspace}' ) ;
@@ -25,7 +25,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
25
25
it ( 'should open the Row Detail of the 2nd row and expect to find an inner grid with all inner column titles' , ( ) => {
26
26
cy . get ( '.slick-cell.detail-view-toggle:nth(1)' ) . click ( ) . wait ( 40 ) ;
27
27
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)' ) ;
29
29
30
30
cy . get ( '#innergrid-1' )
31
31
. find ( '.slick-header-columns' )
@@ -35,12 +35,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
35
35
36
36
it ( 'should sort 2nd Row Detail inner grid "Freight" column in ascending order and filter "Ship City" with "m" and expect 2 sorted rows' , ( ) => {
37
37
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 ( ) ;
44
39
45
40
cy . get ( '#innergrid-1 .slick-header-menu .slick-menu-command-list' )
46
41
. should ( 'be.visible' )
@@ -132,12 +127,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
132
127
133
128
cy . get ( '.slick-cell + .dynamic-cell-detail' ) . find ( 'h4' ) . should ( 'contain' , `- Order Details (id: ${ 1 } )` ) ;
134
129
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 ( ) ;
141
131
142
132
cy . get ( '#innergrid-1 .slick-header-menu .slick-menu-command-list' )
143
133
. should ( 'be.visible' )
@@ -181,12 +171,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
181
171
182
172
cy . get ( '.slick-cell + .dynamic-cell-detail' ) . find ( 'h4' ) . should ( 'contain' , `- Order Details (id: ${ 1 } )` ) ;
183
173
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 ( ) ;
190
175
191
176
cy . get ( '#innergrid-1 .slick-header-menu .slick-menu-command-list' )
192
177
. should ( 'be.visible' )
@@ -235,12 +220,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
235
220
236
221
cy . get ( '.slick-cell + .dynamic-cell-detail' ) . find ( 'h4' ) . should ( 'contain' , `- Order Details (id: ${ 1 } )` ) ;
237
222
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 ( ) ;
244
224
245
225
cy . get ( '#innergrid-1 .slick-header-menu .slick-menu-command-list' )
246
226
. should ( 'be.visible' )
@@ -264,11 +244,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
264
244
265
245
cy . get ( '.slick-cell + .dynamic-cell-detail' ) . find ( 'h4' ) . should ( 'contain' , `- Order Details (id: ${ 2 } )` ) ;
266
246
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 ( ) ;
272
248
273
249
cy . get ( '#innergrid-2 .slick-header-menu .slick-menu-command-list' )
274
250
. should ( 'be.visible' )
@@ -289,10 +265,11 @@ describe('Example 45 - Row Detail with inner Grid', () => {
289
265
290
266
it ( 'should go to the bottom end of the grid and open row 987' , ( ) => {
291
267
cy . get ( '#grid45' ) . type ( '{ctrl}{end}' , { release : false } ) ;
292
- cy . wait ( 50 ) ;
293
268
cy . get ( '.slick-row[data-row=1001] .detail-view-toggle' ) . first ( ) . click ( ) ;
294
269
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' ) ;
296
273
cy . get ( '.slick-empty-data-warning' ) . should ( 'be.visible' ) ;
297
274
} ) ;
298
275
@@ -315,7 +292,9 @@ describe('Example 45 - Row Detail with inner Grid', () => {
315
292
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' , ( ) => {
316
293
cy . get ( '#grid45' ) . type ( '{ctrl}{end}' , { release : false } ) ;
317
294
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' ) ;
319
298
cy . get ( '.slick-empty-data-warning' ) . should ( 'be.visible' ) ;
320
299
} ) ;
321
300
@@ -351,7 +330,9 @@ describe('Example 45 - Row Detail with inner Grid', () => {
351
330
it ( 'should change Row Detail panel height to 15, open 2nd and 3rd then execute PageDown twice' , ( ) => {
352
331
ROW_DETAIL_PANEL_COUNT = 15 ;
353
332
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' ) ;
355
336
cy . get ( '[data-test="set-count-btn"]' ) . click ( ) ;
356
337
357
338
cy . get ( '.slick-cell.detail-view-toggle:nth(1)' ) . click ( ) . wait ( 40 ) ;
@@ -363,9 +344,7 @@ describe('Example 45 - Row Detail with inner Grid', () => {
363
344
cy . get ( `#innergrid-1 [style="top: ${ GRID_ROW_HEIGHT * 1 } px;"] > .slick-cell:nth(1)` ) . should ( 'contain' , 'München' ) ;
364
345
365
346
// 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 ) ;
369
348
370
349
// 3rd row detail
371
350
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', () => {
393
372
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' , ( ) => {
394
373
ROW_DETAIL_PANEL_COUNT = 8 ;
395
374
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' ) ;
397
378
cy . get ( '[data-test="set-count-btn"]' ) . click ( ) ;
398
379
399
380
cy . get ( '.slick-cell.detail-view-toggle:nth(1)' ) . click ( ) . wait ( 40 ) ;
0 commit comments