@@ -137,7 +137,7 @@ describe('Example 21 - Row Detail View', () => {
137137 . find ( 'h3' )
138138 . contains ( 'Task 0' ) ;
139139
140- cy . get ( '[data-test=close -all-btn]' )
140+ cy . get ( '[data-test=collapse -all-btn]' )
141141 . click ( ) ;
142142
143143 cy . get ( '.slick-viewport-top.slick-viewport-left' )
@@ -164,7 +164,7 @@ describe('Example 21 - Row Detail View', () => {
164164 } ) ;
165165
166166 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' ] ;
168168
169169 cy . get ( '#grid21' )
170170 . find ( '.slick-row:nth(0)' )
@@ -247,24 +247,28 @@ describe('Example 21 - Row Detail View', () => {
247247 } ) ;
248248 } ) ;
249249
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' , ( ) => {
251251 cy . get ( '#grid21' )
252252 . find ( '.slick-row:nth(4)' )
253253 . click ( ) ;
254254
255255 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' )
257261 . as ( 'detailContainer' ) ;
258262
259263 cy . get ( '@detailContainer' )
260264 . find ( 'h3' )
261- . contains ( 'Task 102 ' ) ;
265+ . contains ( 'Task 101 ' ) ;
262266
263267 cy . get ( '.search-filter.filter-title' )
264- . type ( 'Task 102 ' ) ;
268+ . type ( 'Task 101 ' ) ;
265269 } ) ;
266270
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' , ( ) => {
268272 cy . get ( '#grid21' )
269273 . find ( 'button.slick-grid-menu-button' )
270274 . trigger ( 'click' )
@@ -278,15 +282,15 @@ describe('Example 21 - Row Detail View', () => {
278282 . click ( ) ;
279283
280284 cy . get ( '#grid21' )
281- . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_102 .container_102 ' )
285+ . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_101 ' )
282286 . as ( 'detailContainer' ) ;
283287
284288 cy . get ( '@detailContainer' )
285289 . find ( 'h3' )
286- . contains ( 'Task 102 ' ) ;
290+ . contains ( 'Task 101 ' ) ;
287291 } ) ;
288292
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 ' , ( ) => {
290294 cy . get ( '#grid21' )
291295 . find ( 'button.slick-grid-menu-button' )
292296 . trigger ( 'click' )
@@ -302,45 +306,39 @@ describe('Example 21 - Row Detail View', () => {
302306 . find ( '.slick-sort-indicator-asc' )
303307 . should ( 'have.length' , 0 ) ;
304308
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 ) ;
312310 } ) ;
313311
314312 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 ( ) ;
316314 cy . get ( '[data-test="editable-grid-btn"]' ) . click ( ) ;
317315 } ) ;
318316
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' , ( ) => {
320318 cy . get ( '#grid21' )
321- . find ( '.slick-row:nth(2 ) .slick-cell:nth(0)' )
319+ . find ( '.slick-row:nth(4 ) .slick-cell:nth(0)' )
322320 . click ( ) ;
323321
324322 cy . get ( '#grid21' )
325- . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_100 .container_100 ' )
323+ . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_101 ' )
326324 . as ( 'detailContainer' ) ;
327325
328326 cy . get ( '@detailContainer' )
329327 . find ( 'h3' )
330- . contains ( 'Task 100 ' ) ;
328+ . contains ( 'Task 101 ' ) ;
331329 } ) ;
332330
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' , ( ) => {
334332 cy . get ( '#grid21' )
335333 . find ( '.slick-row:nth(1) .slick-cell:nth(1)' )
336334 . click ( ) ;
337335
338336 cy . get ( '.editor-title' )
339337 . invoke ( 'val' )
340- . then ( text => expect ( text ) . to . eq ( 'Task 10 ' ) ) ;
338+ . then ( text => expect ( text ) . to . eq ( 'Task 1 ' ) ) ;
341339
342340 cy . get ( '#grid21' )
343- . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_100 .container_100 ' )
341+ . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_101 ' )
344342 . should ( 'not.exist' ) ;
345343 } ) ;
346344} ) ;
0 commit comments