Skip to content

Commit b1767bb

Browse files
authored
Merge branch 'master' into tzhelev/fix-4898--master
2 parents a4a5f66 + c747e53 commit b1767bb

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid-integration.spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ describe('IgxTreeGrid - Integration', () => {
5555
// Init test
5656
fix = TestBed.createComponent(IgxTreeGridStringTreeColumnComponent);
5757
fix.detectChanges();
58+
tick();
5859
treeGrid = fix.componentInstance.treeGrid;
5960

6061
TreeGridFunctions.verifyTreeColumn(fix, 'Name', 4);

projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid-summaries.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('IgxTreeGrid - Summaries', () => {
3939
describe('', () => {
4040
let fix;
4141
let treeGrid;
42-
beforeEach(fakeAsync(/** height/width setter rAF */() => {
42+
beforeEach(async(/** height/width setter rAF */() => {
4343
fix = TestBed.createComponent(IgxTreeGridSummariesKeyComponent);
4444
fix.detectChanges();
4545
treeGrid = fix.componentInstance.treeGrid;

projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid.component.spec.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,28 @@ describe('IgxTreeGrid Component Tests', () => {
3737
grid = fix.componentInstance.treeGrid;
3838
}));
3939

40+
it('should render 10 records if height is unset and parent container\'s height is unset', () => {
41+
fix.detectChanges();
42+
const defaultHeight = fix.debugElement.query(By.css(TBODY_CLASS)).styles.height;
43+
expect(defaultHeight).not.toBeNull();
44+
expect(parseInt(defaultHeight, 10)).toBeGreaterThan(400);
45+
expect(fix.componentInstance.isVerticalScrollbarVisible()).toBeTruthy();
46+
expect(grid.rowList.length).toBeGreaterThanOrEqual(10);
47+
});
48+
4049
it('should match width and height of parent container when width/height are set in %', fakeAsync(() => {
4150
fix.componentInstance.outerWidth = 800;
4251
fix.componentInstance.outerHeight = 600;
4352
grid.width = '50%';
4453
grid.height = '50%';
45-
tick();
4654
fix.detectChanges();
55+
tick();
4756

4857
expect(window.getComputedStyle(grid.nativeElement).height).toMatch('300px');
4958
expect(window.getComputedStyle(grid.nativeElement).width).toMatch('400px');
5059
expect(grid.rowList.length).toBeGreaterThan(0);
5160
}));
5261

53-
it('should render 10 records if height is unset and parent container\'s height is unset', () => {
54-
fix.detectChanges();
55-
const defaultHeight = fix.debugElement.query(By.css(TBODY_CLASS)).styles.height;
56-
expect(defaultHeight).not.toBeNull();
57-
expect(parseInt(defaultHeight, 10)).toBeGreaterThan(400);
58-
expect(fix.componentInstance.isVerticalScrollbarVisible()).toBeTruthy();
59-
expect(grid.rowList.length).toBeGreaterThanOrEqual(10);
60-
});
61-
6262
it('should render 10 records if height is 100% and parent container\'s height is unset', fakeAsync(() => {
6363
grid.height = '600px';
6464
tick();

0 commit comments

Comments
 (0)