Browse Source

test: lookup & rollup

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5848/head
Raju Udava 1 year ago committed by Pranav C
parent
commit
9aac16162b
  1. 32
      tests/playwright/tests/db/filters.spec.ts

32
tests/playwright/tests/db/filters.spec.ts

@ -936,10 +936,12 @@ test.describe('Filter Tests: Link to another record, Lookup, Rollup', () => {
// add filter for CityList column
const filterList = [
{ op: 'is', value: 'Kabul', rowCount: 1 },
{ op: 'is not', value: 'Kabul', rowCount: 108 },
{ op: 'is like', value: 'bad', rowCount: 2 },
{ op: 'is not like', value: 'bad', rowCount: 107 },
{ op: '=', value: '5', rowCount: 5 },
{ op: '!=', value: '5', rowCount: 104 },
{ op: '>', value: '5', rowCount: 25 },
{ op: '<', value: '5', rowCount: 79 },
{ op: '>=', value: '5', rowCount: 30 },
{ op: '<=', value: '5', rowCount: 84 },
{ op: 'is blank', value: null, rowCount: 0 },
{ op: 'is not blank', value: null, rowCount: 109 },
];
@ -964,8 +966,8 @@ test.describe('Filter Tests: Link to another record, Lookup, Rollup', () => {
await dashboard.grid.column.create({
title: 'Lookup',
type: 'Lookup',
childTable: 'Address List',
childColumn: 'PostalCode',
childTable: 'Country',
childColumn: 'Country',
});
// Enable NULL & EMPTY filters
@ -974,12 +976,12 @@ test.describe('Filter Tests: Link to another record, Lookup, Rollup', () => {
// add filter for CityList column
const filterList = [
{ op: 'is equal', value: '4166', rowCount: 1 },
{ op: 'is not equal', value: '4166', rowCount: 599 },
{ op: 'is like', value: '41', rowCount: 19 },
{ op: 'is not like', value: '41', rowCount: 581 },
{ op: 'is blank', value: null, rowCount: 1 },
{ op: 'is not blank', value: null, rowCount: 599 },
{ op: 'is equal', value: 'Spain', rowCount: 5 },
{ op: 'is not equal', value: 'Spain', rowCount: 595 },
{ op: 'is like', value: 'ca', rowCount: 28 },
{ op: 'is not like', value: 'ca', rowCount: 572 },
{ op: 'is blank', value: null, rowCount: 0 },
{ op: 'is not blank', value: null, rowCount: 600 },
];
await toolbar.clickFilter();
@ -1017,6 +1019,8 @@ test.describe('Filter Tests: Link to another record, Lookup, Rollup', () => {
{ op: 'is not equal', value: '4166', rowCount: 599 },
{ op: 'is like', value: '41', rowCount: 19 },
{ op: 'is not like', value: '41', rowCount: 581 },
{ op: 'is empty', value: '41', rowCount: 581 },
{ op: 'is not empty', value: '41', rowCount: 581 },
{ op: 'is blank', value: null, rowCount: 2 },
{ op: 'is not blank', value: null, rowCount: 598 },
];
@ -1025,11 +1029,11 @@ test.describe('Filter Tests: Link to another record, Lookup, Rollup', () => {
await toolbar.filter.clickAddFilter();
for (let i = 0; i < filterList.length; i++) {
await verifyFilter({
column: 'Lookup',
column: 'Rollup',
opType: filterList[i].op,
value: filterList[i].value,
result: { rowCount: filterList[i].rowCount },
dataType: 'Lookup',
dataType: 'Rollup',
});
}
}

Loading…
Cancel
Save