Skip to content

Commit b0db662

Browse files
authored
Merge branch '9.0.x' into iganchev/select-disabled-6908-9-0-x
2 parents ff0980d + a25adb6 commit b0db662

File tree

4 files changed

+455
-570
lines changed

4 files changed

+455
-570
lines changed

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { DefaultSortingStrategy } from '../../data-operations/sorting-strategy';
1313
import { IgxStringFilteringOperand } from '../../data-operations/filtering-condition';
1414
import { configureTestSuite } from '../../test-utils/configure-suite';
1515
import { IgxGridHeaderComponent } from '../headers/grid-header.component';
16+
import { GridSummaryFunctions } from '../../test-utils/grid-functions.spec';
1617

1718
const GRID_COL_THEAD_TITLE_CLASS = 'igx-grid__th-title';
1819
const GRID_COL_GROUP_THEAD_TITLE_CLASS = 'igx-grid__thead-title';
@@ -179,6 +180,8 @@ describe('IgxGrid - multi-column headers #grid', () => {
179180
expect(getColGroup(grid, 'General Information').hidden).toEqual(false);
180181
}));
181182

183+
184+
182185
it('Width should be correct. Column group with column. No width.', fakeAsync(/** height/width setter rAF */() => {
183186
const fixture = TestBed.createComponent(OneGroupOneColGridComponent);
184187
fixture.detectChanges();
@@ -1211,6 +1214,28 @@ describe('IgxGrid - multi-column headers #grid', () => {
12111214
expect(grid.getCellByColumn(4, 'Country').value).toEqual('Sweden');
12121215
}));
12131216

1217+
it('summaries - verify summaries when there are grouped columns', fakeAsync(() => {
1218+
const fixture = TestBed.createComponent(ColumnGroupFourLevelTestComponent);
1219+
fixture.detectChanges();
1220+
const grid = fixture.componentInstance.grid;
1221+
const allColumns = grid.columnList;
1222+
allColumns.forEach((col) => {
1223+
if (!col.columnGroup) {
1224+
col.hasSummary = true;
1225+
}
1226+
});
1227+
fixture.detectChanges();
1228+
1229+
const summaryRow = GridSummaryFunctions.getRootSummaryRow(fixture);
1230+
GridSummaryFunctions.verifyColumnSummaries(summaryRow, 0, ['Count'], ['27']);
1231+
GridSummaryFunctions.verifyColumnSummaries(summaryRow, 1, ['Count'], ['27']);
1232+
GridSummaryFunctions.verifyColumnSummaries(summaryRow, 2, ['Count'], ['27']);
1233+
GridSummaryFunctions.verifyColumnSummaries(summaryRow, 3, ['Count'], ['27']);
1234+
GridSummaryFunctions.verifyColumnSummaries(summaryRow, 4, ['Count'], ['27']);
1235+
GridSummaryFunctions.verifyColumnSummaries(summaryRow, 5, ['Count'], ['27']);
1236+
GridSummaryFunctions.verifyColumnSummaries(summaryRow, 6, ['Count'], ['27']);
1237+
}));
1238+
12141239
it('filtering - filter a grouped column', fakeAsync(() => {
12151240
const fixture = TestBed.createComponent(ColumnGroupFourLevelTestComponent);
12161241
fixture.detectChanges();
@@ -1271,6 +1296,7 @@ describe('IgxGrid - multi-column headers #grid', () => {
12711296
}));
12721297

12731298

1299+
12741300
it('grouping - verify grouping when there are grouped columns', fakeAsync(/** height/width setter rAF */() => {
12751301
const fixture = TestBed.createComponent(ColumnGroupGroupingTestComponent);
12761302
fixture.detectChanges();

0 commit comments

Comments
 (0)