@@ -487,7 +487,8 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
487
487
488
488
expect ( grid . filtering . emit ) . toHaveBeenCalledWith ( { owner : grid , cancel : false , filteringExpressions : null } ) ;
489
489
expect ( grid . filtering . emit ) . toHaveBeenCalledTimes ( 2 ) ;
490
- expect ( grid . filteringDone . emit ) . toHaveBeenCalledWith ( null ) ;
490
+ const emptyFilter = new FilteringExpressionsTree ( null , columnName ) ;
491
+ expect ( grid . filteringDone . emit ) . toHaveBeenCalledWith ( emptyFilter ) ;
491
492
expect ( grid . filteringDone . emit ) . toHaveBeenCalledTimes ( 2 ) ;
492
493
493
494
const filterUiRow = fix . debugElement . query ( By . css ( FILTER_UI_ROW ) ) ;
@@ -514,7 +515,8 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
514
515
515
516
const args = { owner : grid , cancel : false , filteringExpressions : null } ;
516
517
expect ( grid . filtering . emit ) . toHaveBeenCalledWith ( args ) ;
517
- expect ( grid . filteringDone . emit ) . toHaveBeenCalledWith ( null ) ;
518
+ const emptyFilter = new FilteringExpressionsTree ( null , columnName ) ;
519
+ expect ( grid . filteringDone . emit ) . toHaveBeenCalledWith ( emptyFilter ) ;
518
520
} ) ) ;
519
521
520
522
it ( 'Removing second condition removes the And/Or button' , fakeAsync ( ( ) => {
@@ -826,13 +828,14 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
826
828
spyOn ( grid . filtering , 'emit' ) ;
827
829
spyOn ( grid . filteringDone , 'emit' ) ;
828
830
829
- grid . filter ( 'ProductName' , 'I' , IgxStringFilteringOperand . instance ( ) . condition ( 'startsWith' ) ) ;
831
+ const columnName = 'ProductName' ;
832
+ grid . filter ( columnName , 'I' , IgxStringFilteringOperand . instance ( ) . condition ( 'startsWith' ) ) ;
830
833
tick ( 30 ) ;
831
834
fix . detectChanges ( ) ;
832
835
833
836
expect ( grid . rowList . length ) . toEqual ( 2 ) ;
834
837
835
- const filteringExpressions = grid . filteringExpressionsTree . find ( 'ProductName' ) as FilteringExpressionsTree ;
838
+ const filteringExpressions = grid . filteringExpressionsTree . find ( columnName ) as FilteringExpressionsTree ;
836
839
const args = { owner : grid , cancel : false , filteringExpressions } ;
837
840
expect ( grid . filtering . emit ) . toHaveBeenCalledWith ( args ) ;
838
841
expect ( grid . filtering . emit ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -852,7 +855,8 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
852
855
args . filteringExpressions = null ;
853
856
expect ( grid . filtering . emit ) . toHaveBeenCalledWith ( args ) ;
854
857
expect ( grid . filtering . emit ) . toHaveBeenCalledTimes ( 2 ) ;
855
- expect ( grid . filteringDone . emit ) . toHaveBeenCalledWith ( null ) ;
858
+ const emptyFilter = new FilteringExpressionsTree ( null , columnName ) ;
859
+ expect ( grid . filteringDone . emit ) . toHaveBeenCalledWith ( emptyFilter ) ;
856
860
expect ( grid . filteringDone . emit ) . toHaveBeenCalledTimes ( 2 ) ;
857
861
} ) ) ;
858
862
0 commit comments