@@ -13,6 +13,7 @@ import { DefaultSortingStrategy } from '../../data-operations/sorting-strategy';
1313import { IgxStringFilteringOperand } from '../../data-operations/filtering-condition' ;
1414import { configureTestSuite } from '../../test-utils/configure-suite' ;
1515import { IgxGridHeaderComponent } from '../headers/grid-header.component' ;
16+ import { GridSummaryFunctions } from '../../test-utils/grid-functions.spec' ;
1617
1718const GRID_COL_THEAD_TITLE_CLASS = 'igx-grid__th-title' ;
1819const 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 ( ) ;
@@ -1215,6 +1218,28 @@ describe('IgxGrid - multi-column headers #grid', () => {
12151218 expect ( grid . getCellByColumn ( 4 , 'Country' ) . value ) . toEqual ( 'Sweden' ) ;
12161219 } ) ) ;
12171220
1221+ it ( 'summaries - verify summaries when there are grouped columns' , fakeAsync ( ( ) => {
1222+ const fixture = TestBed . createComponent ( ColumnGroupFourLevelTestComponent ) ;
1223+ fixture . detectChanges ( ) ;
1224+ const grid = fixture . componentInstance . grid ;
1225+ const allColumns = grid . columnList ;
1226+ allColumns . forEach ( ( col ) => {
1227+ if ( ! col . columnGroup ) {
1228+ col . hasSummary = true ;
1229+ }
1230+ } ) ;
1231+ fixture . detectChanges ( ) ;
1232+
1233+ const summaryRow = GridSummaryFunctions . getRootSummaryRow ( fixture ) ;
1234+ GridSummaryFunctions . verifyColumnSummaries ( summaryRow , 0 , [ 'Count' ] , [ '27' ] ) ;
1235+ GridSummaryFunctions . verifyColumnSummaries ( summaryRow , 1 , [ 'Count' ] , [ '27' ] ) ;
1236+ GridSummaryFunctions . verifyColumnSummaries ( summaryRow , 2 , [ 'Count' ] , [ '27' ] ) ;
1237+ GridSummaryFunctions . verifyColumnSummaries ( summaryRow , 3 , [ 'Count' ] , [ '27' ] ) ;
1238+ GridSummaryFunctions . verifyColumnSummaries ( summaryRow , 4 , [ 'Count' ] , [ '27' ] ) ;
1239+ GridSummaryFunctions . verifyColumnSummaries ( summaryRow , 5 , [ 'Count' ] , [ '27' ] ) ;
1240+ GridSummaryFunctions . verifyColumnSummaries ( summaryRow , 6 , [ 'Count' ] , [ '27' ] ) ;
1241+ } ) ) ;
1242+
12181243 it ( 'filtering - filter a grouped column' , fakeAsync ( ( ) => {
12191244 const fixture = TestBed . createComponent ( ColumnGroupFourLevelTestComponent ) ;
12201245 fixture . detectChanges ( ) ;
@@ -1275,6 +1300,7 @@ describe('IgxGrid - multi-column headers #grid', () => {
12751300 } ) ) ;
12761301
12771302
1303+
12781304 it ( 'grouping - verify grouping when there are grouped columns' , fakeAsync ( /** height/width setter rAF */ ( ) => {
12791305 const fixture = TestBed . createComponent ( ColumnGroupGroupingTestComponent ) ;
12801306 fixture . detectChanges ( ) ;
0 commit comments