@@ -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' ;
1819
@@ -26,6 +27,7 @@ describe('IgxGrid - Advanced Filtering', () => {
2627 beforeEach ( async ( ( ) => {
2728 TestBed . configureTestingModule ( {
2829 declarations : [
30+ IgxGridAdvancedFilteringColumnGroupComponent ,
2931 IgxGridAdvancedFilteringComponent
3032 ] ,
3133 imports : [
@@ -2660,6 +2662,34 @@ describe('IgxGrid - Advanced Filtering', () => {
26602662 } ) ) ;
26612663 } ) ;
26622664 } ) ;
2665+
2666+ describe ( '' , ( ) => {
2667+ let fix , grid : IgxGridComponent ;
2668+ beforeEach ( fakeAsync ( ( ) => {
2669+ fix = TestBed . createComponent ( IgxGridAdvancedFilteringColumnGroupComponent ) ;
2670+ grid = fix . componentInstance . grid ;
2671+ fix . detectChanges ( ) ;
2672+ } ) ) ;
2673+
2674+ it ( 'Should not display column groups in advanced filtering dialog.' , fakeAsync ( ( ) => {
2675+ // Open dialog through API.
2676+ grid . openAdvancedFilteringDialog ( ) ;
2677+ fix . detectChanges ( ) ;
2678+
2679+ // Click the initial 'Add And Group' button.
2680+ const addAndGroupButton = GridFunctions . getAdvancedFilteringInitialAddGroupButtons ( fix ) [ 0 ] ;
2681+ addAndGroupButton . click ( ) ;
2682+ tick ( 100 ) ;
2683+ fix . detectChanges ( ) ;
2684+
2685+ // Open column dropdown and verify that there are no column groups present.
2686+ GridFunctions . clickAdvancedFilteringColumnSelect ( fix ) ;
2687+ fix . detectChanges ( ) ;
2688+ const dropdownValues = GridFunctions . getAdvancedFilteringSelectDropdownItems ( fix ) . map ( ( x : any ) => x . innerText ) ;
2689+ const expectedValues = [ 'ID' , 'ProductName' , 'Downloads' , 'Released' , 'ReleaseDate' , 'Another Field' ] ;
2690+ expect ( expectedValues ) . toEqual ( dropdownValues ) ;
2691+ } ) ) ;
2692+ } ) ;
26632693} ) ;
26642694
26652695
@@ -2852,8 +2882,6 @@ function verifyContextMenuType(fix, shouldBeContextualGroup: boolean) {
28522882
28532883function verifyEqualArrays ( firstArr : any [ ] , secondArr : any [ ] ) {
28542884 expect ( firstArr . length ) . toEqual ( secondArr . length , 'Array lengths mismatch.' ) ;
2855- firstArr = firstArr . sort ( ) ;
2856- secondArr = secondArr . sort ( ) ;
28572885 // Verify sorted arrays have equal respective elements.
28582886 const len = firstArr . length ;
28592887 for ( let index = 0 ; index < len ; index ++ ) {
0 commit comments