@@ -13,6 +13,7 @@ import { changei18n, getCurrentResourceStrings } from '../../core/i18n/resources
1313import { FilteringExpressionsTree } from '../../data-operations/filtering-expressions-tree' ;
1414import { FilteringLogic } from '../../data-operations/filtering-expression.interface' ;
1515import {
16+ IgxGridAdvancedFilteringColumnGroupComponent ,
1617 IgxGridAdvancedFilteringComponent
1718} from '../../test-utils/grid-samples.spec' ;
1819import { resizeObserverIgnoreError } from '../../test-utils/helper-utils.spec' ;
@@ -27,6 +28,7 @@ describe('IgxGrid - Advanced Filtering', () => {
2728 beforeEach ( async ( ( ) => {
2829 TestBed . configureTestingModule ( {
2930 declarations : [
31+ IgxGridAdvancedFilteringColumnGroupComponent ,
3032 IgxGridAdvancedFilteringComponent
3133 ] ,
3234 imports : [
@@ -2662,6 +2664,35 @@ describe('IgxGrid - Advanced Filtering', () => {
26622664 } ) ) ;
26632665 } ) ;
26642666 } ) ;
2667+
2668+ describe ( '' , ( ) => {
2669+ let fix , grid : IgxGridComponent ;
2670+ beforeEach ( fakeAsync ( ( ) => {
2671+ resizeObserverIgnoreError ( ) ;
2672+ fix = TestBed . createComponent ( IgxGridAdvancedFilteringColumnGroupComponent ) ;
2673+ grid = fix . componentInstance . grid ;
2674+ fix . detectChanges ( ) ;
2675+ } ) ) ;
2676+
2677+ it ( 'Should not display column groups in advanced filtering dialog.' , fakeAsync ( ( ) => {
2678+ // Open dialog through API.
2679+ grid . openAdvancedFilteringDialog ( ) ;
2680+ fix . detectChanges ( ) ;
2681+
2682+ // Click the initial 'Add And Group' button.
2683+ const addAndGroupButton = GridFunctions . getAdvancedFilteringInitialAddGroupButtons ( fix ) [ 0 ] ;
2684+ addAndGroupButton . click ( ) ;
2685+ tick ( 100 ) ;
2686+ fix . detectChanges ( ) ;
2687+
2688+ // Open column dropdown and verify that there are no column groups present.
2689+ GridFunctions . clickAdvancedFilteringColumnSelect ( fix ) ;
2690+ fix . detectChanges ( ) ;
2691+ const dropdownValues = GridFunctions . getAdvancedFilteringSelectDropdownItems ( fix ) . map ( ( x : any ) => x . innerText ) ;
2692+ const expectedValues = [ 'ID' , 'ProductName' , 'Downloads' , 'Released' , 'ReleaseDate' , 'Another Field' ] ;
2693+ verifyEqualArrays ( dropdownValues , expectedValues ) ;
2694+ } ) ) ;
2695+ } ) ;
26652696} ) ;
26662697
26672698
0 commit comments