@@ -485,9 +485,10 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
485485            GridFunctions . clickFilterCellChip ( fix ,  columnName ) ; 
486486            GridFunctions . resetFilterRow ( fix ) ; 
487487
488-             expect ( grid . filtering . emit ) . toHaveBeenCalledWith ( {  owner : grid ,  cancel : false ,  filteringExpressions : null  } ) ; 
488+             const  emptyFilter  =  new  FilteringExpressionsTree ( null ,  columnName ) ; 
489+             expect ( grid . filtering . emit ) . toHaveBeenCalledWith ( {  owner : grid ,  cancel : false ,  filteringExpressions : emptyFilter  } ) ; 
489490            expect ( grid . filtering . emit ) . toHaveBeenCalledTimes ( 2 ) ; 
490-             expect ( grid . filteringDone . emit ) . toHaveBeenCalledWith ( null ) ; 
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 ) ) ; 
@@ -512,9 +513,10 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
512513            tick ( 100 ) ; 
513514            fix . detectChanges ( ) ; 
514515
515-             const  args  =  {  owner : grid ,  cancel : false ,  filteringExpressions : null  } ; 
516+             const  emptyFilter  =  new  FilteringExpressionsTree ( null ,  columnName ) ; 
517+             const  args  =  {  owner : grid ,  cancel : false ,  filteringExpressions : emptyFilter  } ; 
516518            expect ( grid . filtering . emit ) . toHaveBeenCalledWith ( args ) ; 
517-             expect ( grid . filteringDone . emit ) . toHaveBeenCalledWith ( null ) ; 
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 ) ; 
@@ -849,10 +852,11 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
849852
850853            expect ( grid . rowList . length ) . toEqual ( 8 ) ; 
851854
852-             args . filteringExpressions  =  null ; 
855+             const  emptyFilter  =  new  FilteringExpressionsTree ( null ,  columnName ) ; 
856+             args . filteringExpressions  =  emptyFilter ; 
853857            expect ( grid . filtering . emit ) . toHaveBeenCalledWith ( args ) ; 
854858            expect ( grid . filtering . emit ) . toHaveBeenCalledTimes ( 2 ) ; 
855-             expect ( grid . filteringDone . emit ) . toHaveBeenCalledWith ( null ) ; 
859+             expect ( grid . filteringDone . emit ) . toHaveBeenCalledWith ( emptyFilter ) ; 
856860            expect ( grid . filteringDone . emit ) . toHaveBeenCalledTimes ( 2 ) ; 
857861        } ) ) ; 
858862
0 commit comments