File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
projects/igniteui-angular/src/lib/grids/grid Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1342,10 +1342,13 @@ describe('IgxGrid Component Tests', () => {
13421342 fix . detectChanges ( ) ;
13431343 await wait ( 16 ) ;
13441344 // check UI
1345+ const rowSelectorHeader = fix . nativeElement . querySelector ( '.igx-grid__thead' ) . querySelector ( '.igx-grid__cbx-selection' ) ;
13451346 const header0 = fix . debugElement . queryAll ( By . css ( 'igx-grid-header-group' ) ) [ 0 ] ;
13461347 const header1 = fix . debugElement . queryAll ( By . css ( 'igx-grid-header-group' ) ) [ 1 ] ;
13471348 const header2 = fix . debugElement . queryAll ( By . css ( 'igx-grid-header-group' ) ) [ 2 ] ;
1348- expect ( header0 . nativeElement . offsetWidth ) . toEqual ( Math . round ( 0.7 * grid . unpinnedWidth ) ) ;
1349+ const expectedWidth = Math . round ( 0.7 * ( grid . unpinnedWidth + rowSelectorHeader . offsetWidth ) ) ;
1350+ expect ( header0 . nativeElement . offsetWidth ) . toBeGreaterThanOrEqual ( expectedWidth - 1 ) ;
1351+ expect ( header0 . nativeElement . offsetWidth ) . toBeLessThanOrEqual ( expectedWidth + 1 ) ;
13491352 expect ( header1 . nativeElement . offsetWidth ) . toEqual ( 136 ) ;
13501353 expect ( header2 . nativeElement . offsetWidth ) . toEqual ( 136 ) ;
13511354 expect ( hScroll . nativeElement . hidden ) . toBe ( false ) ;
You can’t perform that action at this time.
0 commit comments