@@ -11,7 +11,7 @@ import { By } from '@angular/platform-browser';
11
11
import { first , delay } from 'rxjs/operators' ;
12
12
import { setupHierarchicalGridScrollDetection } from '../../test-utils/helper-utils.spec' ;
13
13
14
- xdescribe ( 'IgxHierarchicalGrid Virtualization' , ( ) => {
14
+ describe ( 'IgxHierarchicalGrid Virtualization' , ( ) => {
15
15
configureTestSuite ( ) ;
16
16
let fixture ;
17
17
let hierarchicalGrid : IgxHierarchicalGridComponent ;
@@ -36,6 +36,7 @@ xdescribe('IgxHierarchicalGrid Virtualization', () => {
36
36
// first child of the row should expand indicator
37
37
firstRow . nativeElement . children [ 0 ] . click ( ) ;
38
38
fixture . detectChanges ( ) ;
39
+ await wait ( ) ;
39
40
expect ( firstRow . expanded ) . toBeTruthy ( ) ;
40
41
const verticalScroll = fixture . componentInstance . hgrid . verticalScrollContainer ;
41
42
const elem = verticalScroll [ 'vh' ] . instance . elementRef . nativeElement ;
@@ -61,7 +62,7 @@ xdescribe('IgxHierarchicalGrid Virtualization', () => {
61
62
// first child of the row should expand indicator
62
63
firstRow . nativeElement . children [ 0 ] . click ( ) ;
63
64
fixture . detectChanges ( ) ;
64
-
65
+ await wait ( ) ;
65
66
const childGrid = hierarchicalGrid . hgridAPI . getChildGrids ( false ) [ 0 ] ;
66
67
const verticalScroll = childGrid . verticalScrollContainer ;
67
68
const elem = verticalScroll [ 'vh' ] . instance . elementRef . nativeElement ;
@@ -91,7 +92,7 @@ xdescribe('IgxHierarchicalGrid Virtualization', () => {
91
92
// first child of the row should expand indicator
92
93
firstRow . nativeElement . children [ 0 ] . click ( ) ;
93
94
fixture . detectChanges ( ) ;
94
-
95
+ await wait ( ) ;
95
96
const childGrid = hierarchicalGrid . hgridAPI . getChildGrids ( false ) [ 0 ] ;
96
97
const childCell = childGrid . getCellByColumn ( 0 , 'ID' ) ;
97
98
childCell . nativeElement . focus ( ) ;
@@ -130,9 +131,11 @@ xdescribe('IgxHierarchicalGrid Virtualization', () => {
130
131
// first child of the row should expand indicator
131
132
firstRow . nativeElement . children [ 0 ] . click ( ) ;
132
133
fixture . detectChanges ( ) ;
134
+ await wait ( ) ;
133
135
const secondRow = hierarchicalGrid . dataRowList . toArray ( ) [ 1 ] ;
134
136
secondRow . nativeElement . children [ 0 ] . click ( ) ;
135
137
fixture . detectChanges ( ) ;
138
+ await wait ( ) ;
136
139
137
140
const childGrid1 = hierarchicalGrid . hgridAPI . getChildGrids ( false ) [ 0 ] ;
138
141
const expectedChildData1 = fixture . componentInstance . data [ 0 ] . childData ;
@@ -328,7 +331,7 @@ xdescribe('IgxHierarchicalGrid Virtualization', () => {
328
331
const row = hierarchicalGrid . dataRowList . toArray ( ) [ 3 ] ;
329
332
row . nativeElement . children [ 0 ] . click ( ) ;
330
333
fixture . detectChanges ( ) ;
331
-
334
+ await wait ( ) ;
332
335
// verify index and rowData
333
336
let childRowComponent = fixture . debugElement . query ( By . css ( 'igx-child-grid-row' ) ) . componentInstance ;
334
337
expect ( childRowComponent . rowData . rowID ) . toBe ( '3' ) ;
@@ -364,12 +367,12 @@ xdescribe('IgxHierarchicalGrid Virtualization', () => {
364
367
const row = hierarchicalGrid . dataRowList . toArray ( ) [ 0 ] ;
365
368
row . nativeElement . children [ 0 ] . click ( ) ;
366
369
fixture . detectChanges ( ) ;
367
-
370
+ await wait ( ) ;
368
371
expect ( hierarchicalGrid . verticalScrollContainer . getVerticalScroll ( ) . children [ 0 ] . offsetHeight ) . toEqual ( 550 ) ;
369
372
} ) ;
370
373
} ) ;
371
374
372
- xdescribe ( 'IgxHierarchicalGrid Virtualization Custom Scenarios' , ( ) => {
375
+ describe ( 'IgxHierarchicalGrid Virtualization Custom Scenarios' , ( ) => {
373
376
configureTestSuite ( ) ;
374
377
beforeEach ( async ( ( ) => {
375
378
TestBed . configureTestingModule ( {
@@ -408,7 +411,7 @@ xdescribe('IgxHierarchicalGrid Virtualization Custom Scenarios', () => {
408
411
const row = hierarchicalGrid . dataRowList . toArray ( ) [ 0 ] ;
409
412
row . nativeElement . children [ 0 ] . click ( ) ;
410
413
fixture . detectChanges ( ) ;
411
-
414
+ await wait ( ) ;
412
415
expect ( hierarchicalGrid . verticalScrollContainer . getVerticalScroll ( ) . parentElement . hidden ) . toBeTruthy ( ) ;
413
416
expect ( hierarchicalGrid . tbody . nativeElement . offsetWidth ) . toEqual ( initialBodyWidth ) ;
414
417
} ) ;
0 commit comments