@@ -171,16 +171,17 @@ export function main() {
171171 fixture . detectChanges ( ) ;
172172 //expand first record
173173 var row = $ ( "#grid1" ) . igGrid ( "rowAt" , 0 ) ;
174- $ ( "#grid1" ) . igHierarchicalGrid ( "expand" , row ) ;
175- //change data child data
176- fixture . componentInstance . data [ 0 ] . Products . removeAt ( 0 ) ;
174+ $ ( "#grid1" ) . igHierarchicalGrid ( "expand" , row , ( ) => {
175+ //change data child data
176+ fixture . componentInstance . data [ 0 ] . Products . removeAt ( 0 ) ;
177177
178- setTimeout ( ( ) => {
179- fixture . detectChanges ( ) ;
180- expect ( $ ( fixture . debugElement . nativeElement ) . find ( "#grid1" ) . igHierarchicalGrid ( "option" , "dataSource" ) [ 0 ] . Products . length )
181- . toBe ( 0 ) ;
182- done ( ) ;
183- } , 10 ) ;
178+ setTimeout ( ( ) => {
179+ fixture . detectChanges ( ) ;
180+ expect ( $ ( fixture . debugElement . nativeElement ) . find ( "#grid1" ) . igHierarchicalGrid ( "option" , "dataSource" ) [ 0 ] . Products . length )
181+ . toBe ( 0 ) ;
182+ done ( ) ;
183+ } , 10 ) ;
184+ } ) ;
184185 } ) ;
185186 } ) ;
186187
@@ -196,15 +197,16 @@ export function main() {
196197 fixture . detectChanges ( ) ;
197198 //expand first record
198199 var row = $ ( "#grid1" ) . igGrid ( "rowAt" , 0 ) ;
199- $ ( "#grid1" ) . igHierarchicalGrid ( "expand" , row ) ;
200- //change data child data
201- fixture . componentInstance . data [ 0 ] . Products [ 0 ] . Name = "Custom Name" ;
202- setTimeout ( ( ) => {
203- fixture . detectChanges ( ) ;
204- expect ( $ ( $ ( fixture . debugElement . nativeElement ) . find ( "#grid1_0_Products_child" ) . igGrid ( "cellAt" , 1 , 0 ) ) . text ( ) )
205- . toBe ( "Custom Name" ) ;
206- done ( ) ;
207- } , 10 ) ;
200+ $ ( "#grid1" ) . igHierarchicalGrid ( "expand" , row , ( ) => {
201+ //change data child data
202+ fixture . componentInstance . data [ 0 ] . Products [ 0 ] . Name = "Custom Name" ;
203+ setTimeout ( ( ) => {
204+ fixture . detectChanges ( ) ;
205+ expect ( $ ( $ ( fixture . debugElement . nativeElement ) . find ( "#grid1_0_Products_child" ) . igGrid ( "cellAt" , 1 , 0 ) ) . text ( ) )
206+ . toBe ( "Custom Name" ) ;
207+ done ( ) ;
208+ } , 10 ) ;
209+ } ) ;
208210 } ) ;
209211 } ) ;
210212 } ) ;
0 commit comments