Skip to content

Commit 67a123a

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Attempt to fix mch tests.
1 parent b0bd814 commit 67a123a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@ describe('IgxGrid - multi-column headers #grid', () => {
303303
grid.ngAfterViewInit();
304304

305305

306-
const availableWidth = (parseInt(componentInstance.gridWrapperWidthPx, 10) - grid.scrollWidth).toString();
306+
const scrWitdh = grid.nativeElement.querySelector('.igx-grid__tbody-scrollbar').getBoundingClientRect().width;
307+
const availableWidth = (parseInt(componentInstance.gridWrapperWidthPx, 10) - scrWitdh).toString();
307308
const locationColGroup = getColGroup(grid, 'Location');
308309
const colWidth = Math.round(parseInt(availableWidth, 10) / 3);
309310
const colWidthPx = colWidth + 'px';
@@ -326,7 +327,8 @@ describe('IgxGrid - multi-column headers #grid', () => {
326327
grid.width = gridWidth;
327328
tick();
328329
fixture.detectChanges();
329-
const gridWidthInPx = parseInt(gridWidth, 10) - grid.scrollWidth;
330+
const scrWitdh = grid.nativeElement.querySelector('.igx-grid__tbody-scrollbar').getBoundingClientRect().width;
331+
const gridWidthInPx = parseInt(gridWidth, 10) - scrWitdh;
330332
const colWidth = Math.round(gridWidthInPx / 3);
331333
const colWidthPx = colWidth + 'px';
332334
const locationColGroup = getColGroup(grid, 'Location');
@@ -350,8 +352,10 @@ describe('IgxGrid - multi-column headers #grid', () => {
350352
tick();
351353
fixture.detectChanges();
352354

355+
const scrWitdh = grid.nativeElement.querySelector('.igx-grid__tbody-scrollbar').getBoundingClientRect().width;
356+
353357
const gridWidthInPx = (parseInt(gridWidth, 10) / 100) *
354-
parseInt(componentInstance.gridWrapperWidthPx, 10) - grid.scrollWidth;
358+
parseInt(componentInstance.gridWrapperWidthPx, 10) - scrWitdh;
355359
const colWidth = Math.round(gridWidthInPx / 3);
356360
const colWidthPx = colWidth + 'px';
357361
const locationColGroup = getColGroup(grid, 'Location');

0 commit comments

Comments
 (0)