@@ -137,7 +137,7 @@ describe('Example 21 - Row Detail View', () => {
137
137
. find ( 'h3' )
138
138
. contains ( 'Task 0' ) ;
139
139
140
- cy . get ( '[data-test=close -all-btn]' )
140
+ cy . get ( '[data-test=collapse -all-btn]' )
141
141
. click ( ) ;
142
142
143
143
cy . get ( '.slick-viewport-top.slick-viewport-left' )
@@ -164,7 +164,7 @@ describe('Example 21 - Row Detail View', () => {
164
164
} ) ;
165
165
166
166
it ( 'should open a few Row Details, then sort by Title and expect all Row Details to be closed afterward' , ( ) => {
167
- const expectedTasks = [ 'Task 1' , 'Task 10' , 'Task 100' , 'Task 101' , 'Task 102' , 'Task 103' , 'Task 104' ] ;
167
+ const expectedTasks = [ 'Task 0' , 'Task 1', 'Task 10' , 'Task 100' , 'Task 101' , 'Task 102' , 'Task 103' , 'Task 104' ] ;
168
168
169
169
cy . get ( '#grid21' )
170
170
. find ( '.slick-row:nth(0)' )
@@ -247,24 +247,28 @@ describe('Example 21 - Row Detail View', () => {
247
247
} ) ;
248
248
} ) ;
249
249
250
- it ( 'should click open Row Detail of Task 102 then type a title filter of "Task 102 " and expect Row Detail to be opened and still be rendered' , ( ) => {
250
+ it ( 'should click open Row Detail of Task 1 and Task 101 then type a title filter of "Task 101 " and expect Row Detail to be opened and still be rendered' , ( ) => {
251
251
cy . get ( '#grid21' )
252
252
. find ( '.slick-row:nth(4)' )
253
253
. click ( ) ;
254
254
255
255
cy . get ( '#grid21' )
256
- . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_102 .container_102' )
256
+ . find ( '.slick-row:nth(1)' )
257
+ . click ( ) ;
258
+
259
+ cy . get ( '#grid21' )
260
+ . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_101' )
257
261
. as ( 'detailContainer' ) ;
258
262
259
263
cy . get ( '@detailContainer' )
260
264
. find ( 'h3' )
261
- . contains ( 'Task 102 ' ) ;
265
+ . contains ( 'Task 101 ' ) ;
262
266
263
267
cy . get ( '.search-filter.filter-title' )
264
- . type ( 'Task 102 ' ) ;
268
+ . type ( 'Task 101 ' ) ;
265
269
} ) ;
266
270
267
- it ( 'should call "Clear all Filters" from Grid Menu and expect "Task 102 " to still be rendered correctly' , ( ) => {
271
+ it ( 'should call "Clear all Filters" from Grid Menu and expect "Task 101 " to still be rendered correctly' , ( ) => {
268
272
cy . get ( '#grid21' )
269
273
. find ( 'button.slick-grid-menu-button' )
270
274
. trigger ( 'click' )
@@ -278,15 +282,15 @@ describe('Example 21 - Row Detail View', () => {
278
282
. click ( ) ;
279
283
280
284
cy . get ( '#grid21' )
281
- . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_102 .container_102 ' )
285
+ . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_101 ' )
282
286
. as ( 'detailContainer' ) ;
283
287
284
288
cy . get ( '@detailContainer' )
285
289
. find ( 'h3' )
286
- . contains ( 'Task 102 ' ) ;
290
+ . contains ( 'Task 101 ' ) ;
287
291
} ) ;
288
292
289
- it ( 'should call "Clear all Sorting" from Grid Menu and expect "Task 102" to still be rendered correctly ' , ( ) => {
293
+ it ( 'should call "Clear all Sorting" from Grid Menu and expect all row details to be collapsed ' , ( ) => {
290
294
cy . get ( '#grid21' )
291
295
. find ( 'button.slick-grid-menu-button' )
292
296
. trigger ( 'click' )
@@ -302,45 +306,39 @@ describe('Example 21 - Row Detail View', () => {
302
306
. find ( '.slick-sort-indicator-asc' )
303
307
. should ( 'have.length' , 0 ) ;
304
308
305
- cy . get ( '#grid21' )
306
- . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_102 .container_102' )
307
- . as ( 'detailContainer' ) ;
308
-
309
- cy . get ( '@detailContainer' )
310
- . find ( 'h3' )
311
- . contains ( 'Task 102' ) ;
309
+ cy . get ( '.dynamic-cell-detail' ) . should ( 'have.length' , 0 ) ;
312
310
} ) ;
313
311
314
312
it ( 'should close all row details & make grid editable' , ( ) => {
315
- cy . get ( '[data-test="close -all-btn"]' ) . click ( ) ;
313
+ cy . get ( '[data-test="collapse -all-btn"]' ) . click ( ) ;
316
314
cy . get ( '[data-test="editable-grid-btn"]' ) . click ( ) ;
317
315
} ) ;
318
316
319
- it ( 'should click on 3rd row detail open icon and expect it to open' , ( ) => {
317
+ it ( 'should click on 5th row detail open icon and expect it to open' , ( ) => {
320
318
cy . get ( '#grid21' )
321
- . find ( '.slick-row:nth(2 ) .slick-cell:nth(0)' )
319
+ . find ( '.slick-row:nth(4 ) .slick-cell:nth(0)' )
322
320
. click ( ) ;
323
321
324
322
cy . get ( '#grid21' )
325
- . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_100 .container_100 ' )
323
+ . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_101 ' )
326
324
. as ( 'detailContainer' ) ;
327
325
328
326
cy . get ( '@detailContainer' )
329
327
. find ( 'h3' )
330
- . contains ( 'Task 100 ' ) ;
328
+ . contains ( 'Task 101 ' ) ;
331
329
} ) ;
332
330
333
- it ( 'should click on 1st row "Title" cell to edit it and expect row detail to get closed' , ( ) => {
331
+ it ( 'should click on 2nd row "Title" cell to edit it and expect Task 5 row detail to get closed' , ( ) => {
334
332
cy . get ( '#grid21' )
335
333
. find ( '.slick-row:nth(1) .slick-cell:nth(1)' )
336
334
. click ( ) ;
337
335
338
336
cy . get ( '.editor-title' )
339
337
. invoke ( 'val' )
340
- . then ( text => expect ( text ) . to . eq ( 'Task 10 ' ) ) ;
338
+ . then ( text => expect ( text ) . to . eq ( 'Task 1 ' ) ) ;
341
339
342
340
cy . get ( '#grid21' )
343
- . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_100 .container_100 ' )
341
+ . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_101 ' )
344
342
. should ( 'not.exist' ) ;
345
343
} ) ;
346
344
} ) ;
0 commit comments