@@ -18,6 +18,8 @@ import {
1818 IgxGridAdvancedFilteringBindingComponent
1919} from '../../test-utils/grid-samples.spec' ;
2020import { ControlsFunction } from '../../test-utils/controls-functions.spec' ;
21+ import { IgxHierGridExternalAdvancedFilteringComponent } from '../../test-utils/hierarchical-grid-components.spec' ;
22+ import { IgxHierarchicalGridModule , IgxHierarchicalGridComponent } from '../hierarchical-grid/public_api' ;
2123
2224const ADVANCED_FILTERING_OPERATOR_LINE_AND_CSS_CLASS = 'igx-filter-tree__line--and' ;
2325const ADVANCED_FILTERING_OPERATOR_LINE_OR_CSS_CLASS = 'igx-filter-tree__line--or' ;
@@ -35,11 +37,13 @@ describe('IgxGrid - Advanced Filtering #grid - ', () => {
3537 IgxGridAdvancedFilteringColumnGroupComponent ,
3638 IgxGridAdvancedFilteringComponent ,
3739 IgxGridExternalAdvancedFilteringComponent ,
38- IgxGridAdvancedFilteringBindingComponent
40+ IgxGridAdvancedFilteringBindingComponent ,
41+ IgxHierGridExternalAdvancedFilteringComponent
3942 ] ,
4043 imports : [
4144 NoopAnimationsModule ,
42- IgxGridModule ]
45+ IgxGridModule ,
46+ IgxHierarchicalGridModule ]
4347 } ) . compileComponents ( ) ;
4448 } ) ) ;
4549
@@ -2669,6 +2673,28 @@ describe('IgxGrid - Advanced Filtering #grid - ', () => {
26692673 expect ( grid . rowList . length ) . toBe ( 1 ) ;
26702674 expect ( GridFunctions . getCurrentCellFromGrid ( grid , 0 , 1 ) . value ) . toBe ( 'Ignite UI for JavaScript' ) ;
26712675 } ) ) ;
2676+
2677+ it ( 'Should allow hosting Advanced Filtering dialog outside of the hierarchical grid without any console errors.' , fakeAsync ( ( ) => {
2678+ fix = TestBed . createComponent ( IgxHierGridExternalAdvancedFilteringComponent ) ;
2679+ const hgrid : IgxHierarchicalGridComponent = fix . componentInstance . hgrid ;
2680+ fix . detectChanges ( ) ;
2681+ spyOn ( console , 'error' ) ;
2682+
2683+ const advFilterDialog = fix . nativeElement . querySelector ( '.igx-advanced-filter' ) ;
2684+ const applyFilterButton : any = Array . from ( advFilterDialog . querySelectorAll ( 'button' ) )
2685+ . find ( ( b : any ) => b . innerText . toLowerCase ( ) === 'apply' ) ;
2686+
2687+ applyFilterButton . click ( ) ;
2688+ tick ( 100 ) ;
2689+ fix . detectChanges ( ) ;
2690+
2691+ UIInteractions . simulatePointerEvent ( 'pointerenter' ,
2692+ hgrid . nativeElement . querySelectorAll ( 'igx-hierarchical-grid-cell' ) [ 0 ] , 5 , 5 ) ;
2693+ fix . detectChanges ( ) ;
2694+
2695+ expect ( console . error ) . not . toHaveBeenCalled ( ) ;
2696+ } ) ) ;
2697+
26722698 } ) ;
26732699
26742700 describe ( 'Expression tree bindings - ' , ( ) => {
0 commit comments