Skip to content

Commit ebbce71

Browse files
MKirovaMayaKirova
authored andcommitted
chore(*): Add test.
1 parent e442709 commit ebbce71

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

projects/igniteui-angular/src/lib/grids/grid/column-resizing.spec.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,17 @@ describe('IgxGrid - Deferred Column Resizing #grid', () => {
385385
expect(column.width).toEqual('67px');
386386
}));
387387

388+
it('should autosize column correctly if there is scaling via css.', fakeAsync(/** height/width setter rAF */() => {
389+
grid.nativeElement.style.transform = 'scale(0.6)';
390+
const column = grid.getColumnByName('Items');
391+
392+
column.autosize();
393+
fixture.detectChanges();
394+
395+
expect(column.width).toEqual('92px');
396+
grid.nativeElement.style.transform = '';
397+
}));
398+
388399
it('should autosize column programmatically based only on header.', fakeAsync(() => {
389400
const column = fixture.componentInstance.grid.columnList.filter(c => c.field === 'ReleaseDate')[0];
390401
expect(column.width).toEqual('100px');

0 commit comments

Comments
 (0)