Skip to content

Commit 686aead

Browse files
authored
Merge branch 'master' into mkirova/fix-6239
2 parents 834e6d3 + c5be973 commit 686aead

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

projects/igniteui-angular/src/lib/grids/grid/grid-filtering-advanced.spec.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -542,10 +542,12 @@ describe('IgxGrid - Advanced Filtering', () => {
542542
fix.detectChanges();
543543

544544
// Verify the filter results.
545-
expect(grid.filteredData.length).toEqual(6);
546-
expect(grid.rowList.length).toBe(6);
547-
expect(GridFunctions.getCurrentCellFromGrid(grid, 0, 1).value).toBe('Ignite UI for JavaScript');
548-
expect(GridFunctions.getCurrentCellFromGrid(grid, 1, 1).value).toBe('NetAdvantage');
545+
const expectedData = fix.componentInstance.data.filter(r =>
546+
r.ReleaseDate && r.ReleaseDate.getFullYear() === (new Date()).getFullYear());
547+
expect(grid.filteredData.length).toEqual(expectedData.length);
548+
expect(grid.rowList.length).toBe(expectedData.length);
549+
expect(GridFunctions.getCurrentCellFromGrid(grid, 0, 1).value).toBe(expectedData[0].ProductName);
550+
expect(GridFunctions.getCurrentCellFromGrid(grid, 1, 1).value).toBe(expectedData[1].ProductName);
549551
}));
550552

551553
it('Should correctly filter by a \'date\' column through UI with value from calendar.', fakeAsync(() => {

0 commit comments

Comments
 (0)