@@ -166,9 +166,8 @@ describe('IgxGrid - multi-row-layout', () => {
166166 verifyLayoutHeadersAreAligned ( headerCells , firstRowCells ) ;
167167
168168 // verify block style
169- let groupHeaderBlocks = fixture . debugElement . query ( By . css ( '.igx-grid__thead' ) ) . queryAll ( By . css ( GRID_MRL_BLOCK ) ) ;
170- expect ( groupHeaderBlocks [ 0 ] . nativeElement . style . gridTemplateColumns ) . toBe ( '200px 200px 200px' ) ;
171- expect ( groupHeaderBlocks [ 0 ] . nativeElement . style . gridTemplateRows ) . toBe ( '1fr 1fr 1fr' ) ;
169+ expect ( grid . columnList . first . getGridTemplate ( false , false ) ) . toBe ( '200px 200px 200px' ) ;
170+ expect ( grid . columnList . first . getGridTemplate ( true , false ) ) . toBe ( 'repeat(3,1fr)' ) ;
172171
173172 // creating an incomplete layout 2
174173 fixture . componentInstance . colGroups = [ {
@@ -183,9 +182,8 @@ describe('IgxGrid - multi-row-layout', () => {
183182 fixture . componentInstance . grid . width = '617px' ;
184183 fixture . detectChanges ( ) ;
185184
186- groupHeaderBlocks = fixture . debugElement . query ( By . css ( '.igx-grid__thead' ) ) . queryAll ( By . css ( GRID_MRL_BLOCK ) ) ;
187- expect ( groupHeaderBlocks [ 0 ] . nativeElement . style . gridTemplateColumns ) . toBe ( '200px 200px 200px' ) ;
188- expect ( groupHeaderBlocks [ 0 ] . nativeElement . style . gridTemplateRows ) . toBe ( '1fr 1fr 1fr' ) ;
185+ expect ( grid . columnList . first . getGridTemplate ( false , false ) ) . toBe ( '200px 200px 200px' ) ;
186+ expect ( grid . columnList . first . getGridTemplate ( true , false ) ) . toBe ( 'repeat(3,1fr)' ) ;
189187
190188 } ) ;
191189 it ( 'should initialize correctly when no column widths are set.' , ( ) => {
@@ -854,14 +852,16 @@ describe('IgxGrid - multi-row-layout', () => {
854852
855853 // check first group has height of 2 row spans in header and rows but the header itself should span 1 row
856854 // check group block and column header height
857- const groupHeaderBlocks = fixture . debugElement . query ( By . css ( '.igx-grid__thead' ) ) . queryAll ( By . css ( GRID_MRL_BLOCK ) ) ;
855+ const firstLayout = grid . columnList . toArray ( ) [ 0 ] ;
858856 expect ( grid . multiRowLayoutRowSize ) . toEqual ( 2 ) ;
859- expect ( groupHeaderBlocks [ 0 ] . nativeElement . style . gridTemplateRows ) . toEqual ( '1fr 1fr ' ) ;
860- expect ( groupHeaderBlocks [ 0 ] . nativeElement . offsetHeight ) . toBe ( ( grid . rowHeight + 1 ) * 2 ) ;
857+ expect ( firstLayout . getGridTemplate ( true , false ) ) . toEqual ( 'repeat(2, 1fr) ' ) ;
858+ expect ( firstLayout . headerGroup . element . nativeElement . offsetHeight ) . toBe ( ( grid . rowHeight + 1 ) * 2 ) ;
861859 expect ( grid . getColumnByName ( 'Fax' ) . headerCell . elementRef . nativeElement . offsetHeight ) . toBe ( grid . rowHeight + 1 ) ;
862860
863- expect ( groupHeaderBlocks [ 1 ] . nativeElement . style . gridTemplateRows ) . toEqual ( '1fr 1fr' ) ;
864- expect ( groupHeaderBlocks [ 1 ] . nativeElement . offsetHeight ) . toBe ( ( grid . rowHeight + 1 ) * 2 ) ;
861+ const secondLayout = grid . columnList . toArray ( ) [ 2 ] ;
862+ const contactNameColumn = grid . getColumnByName ( 'ContactName' ) ;
863+ expect ( contactNameColumn . getGridTemplate ( true , false ) ) . toEqual ( 'repeat(2,1fr)' ) ;
864+ expect ( secondLayout . headerGroup . element . nativeElement . offsetHeight ) . toBe ( ( grid . rowHeight + 1 ) * 2 ) ;
865865
866866 // check cell height in row. By default should span 1 row
867867 const firstCell = grid . getCellByColumn ( 0 , 'Fax' ) . nativeElement ;
0 commit comments