@@ -487,7 +487,8 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
487487
488488 expect ( grid . filtering . emit ) . toHaveBeenCalledWith ( { owner : grid , cancel : false , filteringExpressions : null } ) ;
489489 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 ) ;
491492 expect ( grid . filteringDone . emit ) . toHaveBeenCalledTimes ( 2 ) ;
492493
493494 const filterUiRow = fix . debugElement . query ( By . css ( FILTER_UI_ROW ) ) ;
@@ -514,7 +515,8 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
514515
515516 const args = { owner : grid , cancel : false , filteringExpressions : null } ;
516517 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 ) ;
518520 } ) ) ;
519521
520522 it ( 'Removing second condition removes the And/Or button' , fakeAsync ( ( ) => {
@@ -826,13 +828,14 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
826828 spyOn ( grid . filtering , 'emit' ) ;
827829 spyOn ( grid . filteringDone , 'emit' ) ;
828830
829- grid . filter ( 'ProductName' , 'I' , IgxStringFilteringOperand . instance ( ) . condition ( 'startsWith' ) ) ;
831+ const columnName = 'ProductName' ;
832+ grid . filter ( columnName , 'I' , IgxStringFilteringOperand . instance ( ) . condition ( 'startsWith' ) ) ;
830833 tick ( 30 ) ;
831834 fix . detectChanges ( ) ;
832835
833836 expect ( grid . rowList . length ) . toEqual ( 2 ) ;
834837
835- const filteringExpressions = grid . filteringExpressionsTree . find ( 'ProductName' ) as FilteringExpressionsTree ;
838+ const filteringExpressions = grid . filteringExpressionsTree . find ( columnName ) as FilteringExpressionsTree ;
836839 const args = { owner : grid , cancel : false , filteringExpressions } ;
837840 expect ( grid . filtering . emit ) . toHaveBeenCalledWith ( args ) ;
838841 expect ( grid . filtering . emit ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -852,7 +855,8 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
852855 args . filteringExpressions = null ;
853856 expect ( grid . filtering . emit ) . toHaveBeenCalledWith ( args ) ;
854857 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 ) ;
856860 expect ( grid . filteringDone . emit ) . toHaveBeenCalledTimes ( 2 ) ;
857861 } ) ) ;
858862
0 commit comments