@@ -3504,7 +3504,8 @@ describe('IgxGrid - Filtering actions - Excel style filtering', () => {
3504
3504
declarations : [
3505
3505
IgxGridFilteringComponent ,
3506
3506
IgxTestExcelFilteringDatePickerComponent ,
3507
- IgxGridFilteringESFTemplatesComponent
3507
+ IgxGridFilteringESFTemplatesComponent ,
3508
+ IgxGridFilteringMCHComponent
3508
3509
] ,
3509
3510
imports : [
3510
3511
NoopAnimationsModule ,
@@ -5614,6 +5615,37 @@ describe('IgxGrid - Filtering actions - Excel style filtering', () => {
5614
5615
// expect(datePicker.componentInstance.templateDropDownTarget).toBeTruthy();
5615
5616
} ) ) ;
5616
5617
} ) ;
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
+ } ) ;
5617
5649
} ) ;
5618
5650
5619
5651
const expectedResults = [ ] ;
0 commit comments