@@ -22,7 +22,8 @@ import { SortingDirection, ISortingExpression } from '../../data-operations/sort
2222import { configureTestSuite } from '../../test-utils/configure-suite' ;
2323import { IgxTabsModule , IgxTabsComponent } from '../../tabs/public_api' ;
2424import { GridSelectionMode } from '../common/enums' ;
25-
25+ import { FilteringExpressionsTree } from '../../data-operations/filtering-expressions-tree' ;
26+ import { FilteringLogic } from '../../data-operations/filtering-expression.interface' ;
2627
2728describe ( 'IgxGrid Component Tests #grid' , ( ) => {
2829 const MIN_COL_WIDTH = '136px' ;
@@ -345,7 +346,7 @@ describe('IgxGrid Component Tests #grid', () => {
345346 grid . filter ( columns [ 0 ] . field , 546000 , IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' ) ) ;
346347 fixture . detectChanges ( ) ;
347348 tick ( 100 ) ;
348- expect ( gridBody . nativeElement . textContent ) . toEqual ( grid . emptyFilteredGridMessage ) ;
349+ expect ( gridBody . nativeElement . textContent ) . not . toEqual ( grid . emptyFilteredGridMessage ) ;
349350 expect ( parseInt ( window . getComputedStyle ( gridBody . nativeElement ) . height , 10 ) ) . toBe ( 548 ) ;
350351
351352 // Clear filter and check if grid's body height is restored based on all loaded rows
@@ -397,7 +398,7 @@ describe('IgxGrid Component Tests #grid', () => {
397398 grid . filter ( columns [ 0 ] . field , 546000 , IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' ) ) ;
398399 fixture . detectChanges ( ) ;
399400 tick ( 100 ) ;
400- expect ( gridBody . nativeElement . textContent ) . toEqual ( grid . emptyFilteredGridMessage ) ;
401+ expect ( gridBody . nativeElement . textContent ) . not . toEqual ( grid . emptyFilteredGridMessage ) ;
401402
402403 // Clear filter and check if grid's body height is restored based on all loaded rows
403404 grid . clearFilter ( columns [ 0 ] . field ) ;
@@ -484,7 +485,14 @@ describe('IgxGrid Component Tests #grid', () => {
484485 it ( 'should render loading indicator when loading is enabled and the grid has empty filtering pre-applied' , fakeAsync ( ( ) => {
485486 const fixture = TestBed . createComponent ( IgxGridTestComponent ) ;
486487 const grid = fixture . componentInstance . grid ;
487- grid . filter ( 'index' , 0 , IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' ) , true ) ;
488+ grid . filteringExpressionsTree = new FilteringExpressionsTree ( FilteringLogic . And ) ;
489+ grid . filteringExpressionsTree . filteringOperands = [
490+ {
491+ condition : IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' ) ,
492+ fieldName : 'index' ,
493+ searchVal : 0
494+ }
495+ ] ;
488496 grid . isLoading = true ;
489497 fixture . detectChanges ( ) ;
490498 tick ( 16 ) ;
0 commit comments