@@ -5645,6 +5645,44 @@ describe('IgxGrid - Filtering actions - Excel style filtering', () => {
56455645 expect ( pinButton . classList . contains ( 'igx-excel-filter__actions-pin--disabled' ) ) . toBe ( true ,
56465646 'pinButton should be disabled' ) ;
56475647 } ) ) ;
5648+
5649+ it ( 'Should pin column next to already pinned group by moving it to the left.' , fakeAsync ( ( ) => {
5650+ // Test prerequisites
5651+ grid . width = '1000px' ;
5652+ fix . detectChanges ( ) ;
5653+ tick ( 100 ) ;
5654+ // Adjust column widths, so their group can be pinned.
5655+ const columnFields = [ 'ID' , 'ProductName' , 'Downloads' , 'Released' , 'ReleaseDate' , 'AnotherField' ] ;
5656+ columnFields . forEach ( ( columnField ) => {
5657+ const col = grid . columns . find ( ( c ) => c . field === columnField ) ;
5658+ col . width = '100px' ;
5659+ } ) ;
5660+ fix . detectChanges ( ) ;
5661+ // Make 'AnotherField' column movable.
5662+ const column = grid . columns . find ( ( c ) => c . field === 'AnotherField' ) ;
5663+ column . movable = true ;
5664+ fix . detectChanges ( ) ;
5665+
5666+ // Pin the 'General Information' group by pinning its child 'ProductName' column.
5667+ GridFunctions . clickExcelFilterIcon ( fix , 'ProductName' ) ;
5668+ fix . detectChanges ( ) ;
5669+ GridFunctions . clickPinIconInExcelStyleFiltering ( fix , false ) ;
5670+ tick ( 200 ) ;
5671+ fix . detectChanges ( ) ;
5672+
5673+ // Verify 'AnotherField' column is not pinned.
5674+ GridFunctions . verifyColumnIsPinned ( column , false , 7 ) ;
5675+
5676+ // Try to pin the 'AnotherField' column by moving it to the left.
5677+ GridFunctions . clickExcelFilterIcon ( fix , 'AnotherField' ) ;
5678+ fix . detectChanges ( ) ;
5679+ GridFunctions . clickMoveLeftInExcelStyleFiltering ( fix ) ;
5680+ tick ( 200 ) ;
5681+ fix . detectChanges ( ) ;
5682+
5683+ // Verify 'AnotherField' column is successfully pinned next to the column group.
5684+ GridFunctions . verifyColumnIsPinned ( column , true , 8 ) ;
5685+ } ) ) ;
56485686 } ) ;
56495687} ) ;
56505688
0 commit comments