@@ -3504,7 +3504,8 @@ describe('IgxGrid - Filtering actions - Excel style filtering', () => {
35043504 declarations : [
35053505 IgxGridFilteringComponent ,
35063506 IgxTestExcelFilteringDatePickerComponent ,
3507- IgxGridFilteringESFTemplatesComponent
3507+ IgxGridFilteringESFTemplatesComponent ,
3508+ IgxGridFilteringMCHComponent
35083509 ] ,
35093510 imports : [
35103511 NoopAnimationsModule ,
@@ -5614,6 +5615,37 @@ describe('IgxGrid - Filtering actions - Excel style filtering', () => {
56145615 // expect(datePicker.componentInstance.templateDropDownTarget).toBeTruthy();
56155616 } ) ) ;
56165617 } ) ;
5618+
5619+ describe ( null , ( ) => {
5620+ let fix , grid ;
5621+ beforeEach ( fakeAsync ( ( ) => {
5622+ fix = TestBed . createComponent ( IgxGridFilteringMCHComponent ) ;
5623+ grid = fix . componentInstance . grid ;
5624+ grid . filterMode = FilterMode . excelStyleFilter ;
5625+ fix . detectChanges ( ) ;
5626+ } ) ) ;
5627+
5628+ it ( 'Should not pin column when its parent group cannot be pinned.' , fakeAsync ( ( ) => {
5629+ // Test prerequisites
5630+ grid . width = '1000px' ;
5631+ fix . detectChanges ( ) ;
5632+ tick ( 100 ) ;
5633+
5634+ // Pin the 'AnotherField' column.
5635+ GridFunctions . clickExcelFilterIcon ( fix , 'AnotherField' ) ;
5636+ fix . detectChanges ( ) ;
5637+ GridFunctions . clickPinIconInExcelStyleFiltering ( fix , false ) ;
5638+ tick ( 200 ) ;
5639+ fix . detectChanges ( ) ;
5640+
5641+ // Verify that the 'ProductName' pin button is disabled, because its parent column cannot be pinned.
5642+ GridFunctions . clickExcelFilterIcon ( fix , 'ProductName' ) ;
5643+ fix . detectChanges ( ) ;
5644+ const pinButton = GridFunctions . getExcelFilteringPinContainer ( fix ) ;
5645+ expect ( pinButton . classList . contains ( 'igx-excel-filter__actions-pin--disabled' ) ) . toBe ( true ,
5646+ 'pinButton should be disabled' ) ;
5647+ } ) ) ;
5648+ } ) ;
56175649} ) ;
56185650
56195651const expectedResults = [ ] ;
0 commit comments