@@ -24,6 +24,8 @@ import { IgxTabsModule, IgxTabsComponent } from '../../tabs/public_api';
2424import { GridSelectionMode } from '../common/enums' ;
2525import { registerLocaleData } from '@angular/common' ;
2626import localeDE from '@angular/common/locales/de' ;
27+ import { FilteringExpressionsTree } from '../../data-operations/filtering-expressions-tree' ;
28+ import { FilteringLogic } from '../../data-operations/filtering-expression.interface' ;
2729
2830describe ( 'IgxGrid Component Tests #grid' , ( ) => {
2931 const MIN_COL_WIDTH = '136px' ;
@@ -346,7 +348,7 @@ describe('IgxGrid Component Tests #grid', () => {
346348 grid . filter ( columns [ 0 ] . field , 546000 , IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' ) ) ;
347349 fixture . detectChanges ( ) ;
348350 tick ( 100 ) ;
349- expect ( gridBody . nativeElement . textContent ) . toEqual ( grid . emptyFilteredGridMessage ) ;
351+ expect ( gridBody . nativeElement . textContent ) . not . toEqual ( grid . emptyFilteredGridMessage ) ;
350352 expect ( parseInt ( window . getComputedStyle ( gridBody . nativeElement ) . height , 10 ) ) . toBe ( 548 ) ;
351353
352354 // Clear filter and check if grid's body height is restored based on all loaded rows
@@ -398,7 +400,7 @@ describe('IgxGrid Component Tests #grid', () => {
398400 grid . filter ( columns [ 0 ] . field , 546000 , IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' ) ) ;
399401 fixture . detectChanges ( ) ;
400402 tick ( 100 ) ;
401- expect ( gridBody . nativeElement . textContent ) . toEqual ( grid . emptyFilteredGridMessage ) ;
403+ expect ( gridBody . nativeElement . textContent ) . not . toEqual ( grid . emptyFilteredGridMessage ) ;
402404
403405 // Clear filter and check if grid's body height is restored based on all loaded rows
404406 grid . clearFilter ( columns [ 0 ] . field ) ;
@@ -485,7 +487,14 @@ describe('IgxGrid Component Tests #grid', () => {
485487 it ( 'should render loading indicator when loading is enabled and the grid has empty filtering pre-applied' , fakeAsync ( ( ) => {
486488 const fixture = TestBed . createComponent ( IgxGridTestComponent ) ;
487489 const grid = fixture . componentInstance . grid ;
488- grid . filter ( 'index' , 0 , IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' ) , true ) ;
490+ grid . filteringExpressionsTree = new FilteringExpressionsTree ( FilteringLogic . And ) ;
491+ grid . filteringExpressionsTree . filteringOperands = [
492+ {
493+ condition : IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' ) ,
494+ fieldName : 'index' ,
495+ searchVal : 0
496+ }
497+ ] ;
489498 grid . isLoading = true ;
490499 fixture . detectChanges ( ) ;
491500 tick ( 16 ) ;
0 commit comments