@@ -3497,7 +3497,8 @@ describe('IgxGrid - Filtering actions - Excel style filtering', () => {
34973497 declarations : [
34983498 IgxGridFilteringComponent ,
34993499 IgxTestExcelFilteringDatePickerComponent ,
3500- IgxGridFilteringESFTemplatesComponent
3500+ IgxGridFilteringESFTemplatesComponent ,
3501+ IgxGridFilteringMCHComponent
35013502 ] ,
35023503 imports : [
35033504 NoopAnimationsModule ,
@@ -5628,6 +5629,37 @@ describe('IgxGrid - Filtering actions - Excel style filtering', () => {
56285629 // expect(datePicker.componentInstance.templateDropDownTarget).toBeTruthy();
56295630 } ) ) ;
56305631 } ) ;
5632+
5633+ describe ( null , ( ) => {
5634+ let fix , grid ;
5635+ beforeEach ( fakeAsync ( ( ) => {
5636+ fix = TestBed . createComponent ( IgxGridFilteringMCHComponent ) ;
5637+ grid = fix . componentInstance . grid ;
5638+ grid . filterMode = FilterMode . excelStyleFilter ;
5639+ fix . detectChanges ( ) ;
5640+ } ) ) ;
5641+
5642+ it ( 'Should not pin column when its parent group cannot be pinned.' , fakeAsync ( ( ) => {
5643+ // Test prerequisites
5644+ grid . width = '1000px' ;
5645+ fix . detectChanges ( ) ;
5646+ tick ( 100 ) ;
5647+
5648+ // Pin the 'AnotherField' column.
5649+ GridFunctions . clickExcelFilterIcon ( fix , 'AnotherField' ) ;
5650+ fix . detectChanges ( ) ;
5651+ GridFunctions . clickPinIconInExcelStyleFiltering ( fix , false ) ;
5652+ tick ( 200 ) ;
5653+ fix . detectChanges ( ) ;
5654+
5655+ // Verify that the 'ProductName' pin button is disabled, because its parent column cannot be pinned.
5656+ GridFunctions . clickExcelFilterIcon ( fix , 'ProductName' ) ;
5657+ fix . detectChanges ( ) ;
5658+ const pinButton = GridFunctions . getExcelFilteringPinContainer ( fix ) ;
5659+ expect ( pinButton . classList . contains ( 'igx-excel-filter__actions-pin--disabled' ) ) . toBe ( true ,
5660+ 'pinButton should be disabled' ) ;
5661+ } ) ) ;
5662+ } ) ;
56315663} ) ;
56325664
56335665const expectedResults = [ ] ;
0 commit comments