From f88a761d25722c604f70f7b2eaaf338245c21d64 Mon Sep 17 00:00:00 2001 From: Borislav Kulov Date: Mon, 17 Dec 2018 11:27:16 +0200 Subject: [PATCH] test(filtering): Fix the logic calculating test results (#2915) --- .../src/lib/grids/grid/grid-filtering-ui.spec.ts | 4 +++- .../src/lib/grids/grid/grid-filtering.spec.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/igniteui-angular/src/lib/grids/grid/grid-filtering-ui.spec.ts b/projects/igniteui-angular/src/lib/grids/grid/grid-filtering-ui.spec.ts index 28c1d45c97b..775cc8bb78a 100644 --- a/projects/igniteui-angular/src/lib/grids/grid/grid-filtering-ui.spec.ts +++ b/projects/igniteui-angular/src/lib/grids/grid/grid-filtering-ui.spec.ts @@ -2988,7 +2988,9 @@ function fillExpectedResults(grid: IgxGridComponent, calendar: Calendar, today) // day + 15 if (!dateItem0.isThisYear) { thisYearCountItems--; - } else if (dateItem0.isNextYear) { + } + + if (dateItem0.isNextYear) { nextYearCountItems++; } diff --git a/projects/igniteui-angular/src/lib/grids/grid/grid-filtering.spec.ts b/projects/igniteui-angular/src/lib/grids/grid/grid-filtering.spec.ts index 3b636ea814f..3b02b4d8adb 100644 --- a/projects/igniteui-angular/src/lib/grids/grid/grid-filtering.spec.ts +++ b/projects/igniteui-angular/src/lib/grids/grid/grid-filtering.spec.ts @@ -752,7 +752,9 @@ function fillExpectedResults(grid: IgxGridComponent, calendar: Calendar, today) // day + 15 if (!dateItem0.isThisYear) { thisYearCountItems--; - } else if (dateItem0.isNextYear) { + } + + if (dateItem0.isNextYear) { nextYearCountItems++; }