@@ -8,6 +8,7 @@ import { configureTestSuite } from '../../test-utils/configure-suite';
88import { ColumnPinningPosition , RowPinningPosition } from '../common/enums' ;
99import { IPinningConfig } from '../common/grid.interface' ;
1010import { SampleTestData } from '../../test-utils/sample-test-data.spec' ;
11+ import { IgxStringFilteringOperand } from '../../data-operations/filtering-condition' ;
1112
1213describe ( 'Row Pinning #grid' , ( ) => {
1314 const FIXED_ROW_CONTAINER = '.igx-grid__tr--pinned ' ;
@@ -216,12 +217,32 @@ describe('Row Pinning #grid', () => {
216217 expect ( grid . getRowByIndex ( 0 ) . rowID ) . toBe ( fix . componentInstance . data [ 0 ] ) ;
217218 expect ( grid . getRowByIndex ( 1 ) . rowID ) . toBe ( fix . componentInstance . data [ 1 ] ) ;
218219 } ) ;
220+
221+ it ( 'should apply filtering to both pinned and unpinned rows.' , ( ) => {
222+ grid . getRowByIndex ( 1 ) . pin ( ) ;
223+ fix . detectChanges ( ) ;
224+ grid . getRowByIndex ( 5 ) . pin ( ) ;
225+ fix . detectChanges ( ) ;
226+
227+ let pinRowContainer = fix . debugElement . queryAll ( By . css ( FIXED_ROW_CONTAINER ) ) ;
228+ expect ( pinRowContainer [ 0 ] . children . length ) . toBe ( 2 ) ;
229+ expect ( pinRowContainer [ 0 ] . children [ 0 ] . context . rowID ) . toBe ( fix . componentInstance . data [ 1 ] ) ;
230+ expect ( pinRowContainer [ 0 ] . children [ 1 ] . context . rowID ) . toBe ( fix . componentInstance . data [ 5 ] ) ;
231+
232+ grid . filter ( 'ID' , 'B' , IgxStringFilteringOperand . instance ( ) . condition ( 'contains' ) , false ) ;
233+ fix . detectChanges ( ) ;
234+
235+ pinRowContainer = fix . debugElement . queryAll ( By . css ( FIXED_ROW_CONTAINER ) ) ;
236+ expect ( pinRowContainer [ 0 ] . children . length ) . toBe ( 1 ) ;
237+ expect ( pinRowContainer [ 0 ] . children [ 0 ] . context . rowID ) . toBe ( fix . componentInstance . data [ 5 ] ) ;
238+ } ) ;
219239 } ) ;
220240} ) ;
221241
222242@Component ( {
223243 template : `
224244 <igx-grid
245+ [allowFiltering]='true'
225246 [pinning]='pinningConfig'
226247 [width]='"800px"'
227248 [height]='"500px"'
0 commit comments