@@ -13,6 +13,7 @@ import { changei18n, getCurrentResourceStrings } from '../../core/i18n/resources
13
13
import { FilteringExpressionsTree } from '../../data-operations/filtering-expressions-tree' ;
14
14
import { FilteringLogic } from '../../data-operations/filtering-expression.interface' ;
15
15
import {
16
+ IgxGridAdvancedFilteringColumnGroupComponent ,
16
17
IgxGridAdvancedFilteringComponent
17
18
} from '../../test-utils/grid-samples.spec' ;
18
19
@@ -26,6 +27,7 @@ describe('IgxGrid - Advanced Filtering', () => {
26
27
beforeEach ( async ( ( ) => {
27
28
TestBed . configureTestingModule ( {
28
29
declarations : [
30
+ IgxGridAdvancedFilteringColumnGroupComponent ,
29
31
IgxGridAdvancedFilteringComponent
30
32
] ,
31
33
imports : [
@@ -2660,6 +2662,34 @@ describe('IgxGrid - Advanced Filtering', () => {
2660
2662
} ) ) ;
2661
2663
} ) ;
2662
2664
} ) ;
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
+ } ) ;
2663
2693
} ) ;
2664
2694
2665
2695
@@ -2852,8 +2882,6 @@ function verifyContextMenuType(fix, shouldBeContextualGroup: boolean) {
2852
2882
2853
2883
function verifyEqualArrays ( firstArr : any [ ] , secondArr : any [ ] ) {
2854
2884
expect ( firstArr . length ) . toEqual ( secondArr . length , 'Array lengths mismatch.' ) ;
2855
- firstArr = firstArr . sort ( ) ;
2856
- secondArr = secondArr . sort ( ) ;
2857
2885
// Verify sorted arrays have equal respective elements.
2858
2886
const len = firstArr . length ;
2859
2887
for ( let index = 0 ; index < len ; index ++ ) {
0 commit comments