@@ -1469,21 +1469,29 @@ describe('IgxGrid - multi-column headers', () => {
14691469
14701470 expect ( grid . columnList . length ) . toEqual ( 9 ) ;
14711471
1472+ expect ( ( ) => {
1473+ // Delete all column
1474+ fixture . componentInstance . columnGroups [ 0 ] . columns . splice ( 0 , 2 ) ;
1475+ fixture . detectChanges ( ) ;
1476+ } ) . not . toThrow ( ) ;
1477+
1478+ expect ( grid . columnList . length ) . toEqual ( 7 ) ;
1479+
14721480 expect ( ( ) => {
14731481 // Add column
14741482 fixture . componentInstance . columnGroups [ 0 ] . columns . push ( { field : 'Fax' , type : 'string' } ) ;
14751483 fixture . detectChanges ( ) ;
14761484 } ) . not . toThrow ( ) ;
14771485
1478- expect ( grid . columnList . length ) . toEqual ( 10 ) ;
1486+ expect ( grid . columnList . length ) . toEqual ( 8 ) ;
14791487
14801488 expect ( ( ) => {
14811489 // Update column
1482- fixture . componentInstance . columnGroups [ 0 ] . columns [ 1 ] = { field : 'City' , type : 'string' } ;
1490+ fixture . componentInstance . columnGroups [ 0 ] . columns [ 0 ] = { field : 'City' , type : 'string' } ;
14831491 fixture . detectChanges ( ) ;
14841492 } ) . not . toThrow ( ) ;
14851493
1486- expect ( grid . columnList . length ) . toEqual ( 10 ) ;
1494+ expect ( grid . columnList . length ) . toEqual ( 8 ) ;
14871495 } ) ;
14881496} ) ;
14891497
@@ -1864,15 +1872,15 @@ export class DynamicColGroupsGridComponent {
18641872 { columnHeader : 'First' , columns : [
18651873 { field : 'ID' , type : 'string' } ,
18661874 { field : 'CompanyName' , type : 'string' } ,
1867- { field : 'ContactName' , type : 'string' } ,
1875+ { field : 'ContactName' , type : 'string' }
18681876 ] } ,
18691877 { columnHeader : 'Second' , columns : [
18701878 { field : 'ContactTitle' , type : 'string' } ,
1871- { field : 'Address' , type : 'string' } ,
1879+ { field : 'Address' , type : 'string' }
18721880 ] } ,
18731881 { columnHeader : 'Third' , columns : [
18741882 { field : 'PostlCode' , type : 'string' } ,
1875- { field : 'Contry' , type : 'string' } ,
1883+ { field : 'Contry' , type : 'string' }
18761884 ] } ,
18771885 ] ;
18781886 }
0 commit comments