@@ -3506,7 +3506,8 @@ describe('IgxGrid - Filtering actions - Excel style filtering', () => {
35063506 IgxGridFilteringComponent ,
35073507 IgxTestExcelFilteringDatePickerComponent ,
35083508 IgxGridFilteringESFTemplatesComponent ,
3509- IgxGridFilteringESFLoadOnDemandComponent
3509+ IgxGridFilteringESFLoadOnDemandComponent ,
3510+ IgxGridFilteringMCHComponent
35103511 ] ,
35113512 imports : [
35123513 NoopAnimationsModule ,
@@ -5646,6 +5647,37 @@ describe('IgxGrid - Filtering actions - Excel style filtering', () => {
56465647 expect ( listItems . length ) . toBe ( 6 , 'incorrect rendered list items count' ) ;
56475648 loadingIndicator = GridFunctions . getExcelFilteringLoadingIndicator ( fix ) ;
56485649 expect ( loadingIndicator ) . toBeNull ( 'esf loading indicator is visible' ) ;
5650+ } ) ) ;
5651+ } ) ;
5652+
5653+ describe ( null , ( ) => {
5654+ let fix , grid ;
5655+ beforeEach ( fakeAsync ( ( ) => {
5656+ fix = TestBed . createComponent ( IgxGridFilteringMCHComponent ) ;
5657+ grid = fix . componentInstance . grid ;
5658+ grid . filterMode = FilterMode . excelStyleFilter ;
5659+ fix . detectChanges ( ) ;
5660+ } ) ) ;
5661+
5662+ it ( 'Should not pin column when its parent group cannot be pinned.' , fakeAsync ( ( ) => {
5663+ // Test prerequisites
5664+ grid . width = '1000px' ;
5665+ fix . detectChanges ( ) ;
5666+ tick ( 100 ) ;
5667+
5668+ // Pin the 'AnotherField' column.
5669+ GridFunctions . clickExcelFilterIcon ( fix , 'AnotherField' ) ;
5670+ fix . detectChanges ( ) ;
5671+ GridFunctions . clickPinIconInExcelStyleFiltering ( fix , false ) ;
5672+ tick ( 200 ) ;
5673+ fix . detectChanges ( ) ;
5674+
5675+ // Verify that the 'ProductName' pin button is disabled, because its parent column cannot be pinned.
5676+ GridFunctions . clickExcelFilterIcon ( fix , 'ProductName' ) ;
5677+ fix . detectChanges ( ) ;
5678+ const pinButton = GridFunctions . getExcelFilteringPinContainer ( fix ) ;
5679+ expect ( pinButton . classList . contains ( 'igx-excel-filter__actions-pin--disabled' ) ) . toBe ( true ,
5680+ 'pinButton should be disabled' ) ;
56495681 } ) ) ;
56505682 } ) ;
56515683} ) ;
0 commit comments