@@ -220,7 +220,7 @@ describe('IgxGrid - Column Pinning ', () => {
220
220
const currentColumn = 'ProductName' ;
221
221
const releasedColumn = 'Released' ;
222
222
223
- grid . sort ( { fieldName : currentColumn , dir : SortingDirection . Asc } ) ;
223
+ grid . sort ( { fieldName : currentColumn , dir : SortingDirection . Asc } ) ;
224
224
225
225
fix . detectChanges ( ) ;
226
226
@@ -518,6 +518,7 @@ describe('IgxGrid - Column Pinning ', () => {
518
518
expect ( grid . pinnedColumns . length ) . toEqual ( 1 ) ;
519
519
expect ( grid . unpinnedColumns . length ) . toEqual ( 9 ) ;
520
520
} ) ;
521
+
521
522
it ( 'should allow hiding columns in the unpinned area.' , ( ) => {
522
523
523
524
const fix = TestBed . createComponent ( GridPinningComponent ) ;
@@ -601,6 +602,19 @@ describe('IgxGrid - Column Pinning ', () => {
601
602
expect ( grid . columns [ 6 ] . pinned ) . toBe ( true ) ;
602
603
expect ( grid . unpinnedWidth ) . toBeGreaterThanOrEqual ( grid . unpinnedAreaMinWidth ) ;
603
604
} ) ;
605
+
606
+ it ( 'should not have grid layout row with width that extends pass the container\'s one' , ( ) => {
607
+ const fix = TestBed . createComponent ( GridPinningComponent ) ;
608
+ fix . detectChanges ( ) ;
609
+ const grid = fix . componentInstance . instance ;
610
+
611
+ grid . getColumnByName ( 'Phone' ) . pinned = true ;
612
+ fix . detectChanges ( ) ;
613
+
614
+ const gridChildren = Array . prototype . slice . call ( grid . nativeElement . children ) ;
615
+ const gridWidth = grid . nativeElement . getBoundingClientRect ( ) . width ;
616
+ gridChildren . forEach ( elem => expect ( elem . getBoundingClientRect ( ) . width ) . toEqual ( gridWidth ) ) ;
617
+ } ) ;
604
618
} ) ;
605
619
@Component ( {
606
620
template : `
0 commit comments