@@ -1570,21 +1570,29 @@ describe('IgxGrid - multi-column headers #grid', () => {
15701570
15711571 expect ( grid . columnList . length ) . toEqual ( 9 ) ;
15721572
1573+ expect ( ( ) => {
1574+ // Delete all column
1575+ fixture . componentInstance . columnGroups [ 0 ] . columns . splice ( 0 , 2 ) ;
1576+ fixture . detectChanges ( ) ;
1577+ } ) . not . toThrow ( ) ;
1578+
1579+ expect ( grid . columnList . length ) . toEqual ( 7 ) ;
1580+
15731581 expect ( ( ) => {
15741582 // Add column
15751583 fixture . componentInstance . columnGroups [ 0 ] . columns . push ( { field : 'Fax' , type : 'string' } ) ;
15761584 fixture . detectChanges ( ) ;
15771585 } ) . not . toThrow ( ) ;
15781586
1579- expect ( grid . columnList . length ) . toEqual ( 10 ) ;
1587+ expect ( grid . columnList . length ) . toEqual ( 8 ) ;
15801588
15811589 expect ( ( ) => {
15821590 // Update column
1583- fixture . componentInstance . columnGroups [ 0 ] . columns [ 1 ] = { field : 'City' , type : 'string' } ;
1591+ fixture . componentInstance . columnGroups [ 0 ] . columns [ 0 ] = { field : 'City' , type : 'string' } ;
15841592 fixture . detectChanges ( ) ;
15851593 } ) . not . toThrow ( ) ;
15861594
1587- expect ( grid . columnList . length ) . toEqual ( 10 ) ;
1595+ expect ( grid . columnList . length ) . toEqual ( 8 ) ;
15881596 } ) ;
15891597} ) ;
15901598
@@ -1965,15 +1973,15 @@ export class DynamicColGroupsGridComponent {
19651973 { columnHeader : 'First' , columns : [
19661974 { field : 'ID' , type : 'string' } ,
19671975 { field : 'CompanyName' , type : 'string' } ,
1968- { field : 'ContactName' , type : 'string' } ,
1976+ { field : 'ContactName' , type : 'string' }
19691977 ] } ,
19701978 { columnHeader : 'Second' , columns : [
19711979 { field : 'ContactTitle' , type : 'string' } ,
1972- { field : 'Address' , type : 'string' } ,
1980+ { field : 'Address' , type : 'string' }
19731981 ] } ,
19741982 { columnHeader : 'Third' , columns : [
19751983 { field : 'PostlCode' , type : 'string' } ,
1976- { field : 'Contry' , type : 'string' } ,
1984+ { field : 'Contry' , type : 'string' }
19771985 ] } ,
19781986 ] ;
19791987 }
0 commit comments