Skip to content

Commit 11048fe

Browse files
committed
fix(grid): add test for filtering without condition operator
1 parent 3fb0f11 commit 11048fe

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

projects/igniteui-angular/src/lib/data-operations/filtering-strategy.spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,20 @@ describe('Unit testing FilteringStrategy', () => {
4949
const res = fs.matchRecord(rec, expressionTree);
5050
expect(res).toBeTruthy();
5151
});
52+
it ('tests `matchRecordByExpressions` for working with filtering operands with missing condition', () => {
53+
const rec = data[0];
54+
const expressionTree = new FilteringExpressionsTree(FilteringLogic.Or);
55+
expressionTree.filteringOperands = [
56+
{
57+
conditionName: 'contains',
58+
fieldName: 'string',
59+
ignoreCase: false,
60+
searchVal: 'ROW'
61+
}
62+
];
63+
const res = fs.matchRecord(rec, expressionTree);
64+
expect(res).toBeFalsy();
65+
});
5266
it ('tests `findMatch`', () => {
5367
const rec = data[0];
5468
const res = fs.findMatchByExpression(rec, {

0 commit comments

Comments
 (0)