Skip to content

Commit 914d845

Browse files
committed
fix(grid): reduce test data size and ensure proper cleanup in column properties test
1 parent e592959 commit 914d845

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ describe('IgxGrid - Column properties #grid', () => {
15561556
obj[col] = j;
15571557
}
15581558

1559-
for (let i = 0; i < 100000; i++) {
1559+
for (let i = 0; i < 100; i++) {
15601560
const newObj = Object.create(obj);
15611561
newObj['ID'] = i;
15621562
data.push(newObj);
@@ -1573,14 +1573,17 @@ describe('IgxGrid - Column properties #grid', () => {
15731573
}
15741574

15751575
setupGridScrollDetection(fix, grid);
1576-
grid.navigateTo(0, fix.componentInstance.columns.length -1);
1576+
try {
1577+
grid.navigateTo(0, fix.componentInstance.columns.length - 1);
15771578

1578-
state = grid.headerContainer.state;
1579-
visibleColumnSizes = (grid.headerContainer as any).individualSizeCache.slice(state.startIndex, state.startIndex + state.chunkSize);
1580-
for (const val of visibleColumnSizes) {
1581-
expect(val).toBe(68);
1579+
state = grid.headerContainer.state;
1580+
visibleColumnSizes = (grid.headerContainer as any).individualSizeCache.slice(state.startIndex, state.startIndex + state.chunkSize);
1581+
for (const val of visibleColumnSizes) {
1582+
expect(val).toBe(68);
1583+
}
1584+
} finally {
1585+
clearGridSubs();
15821586
}
1583-
clearGridSubs();
15841587
}));
15851588

15861589
it('should auto-size correctly when cell has custom template', fakeAsync(() => {

0 commit comments

Comments
 (0)