Browse Source

test: rollup pg corrections

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5848/head
Raju Udava 2 years ago
parent
commit
af51637542
  1. 46
      packages/nocodb/tests/unit/rest/tests/tableRow.test.ts
  2. 30
      packages/nocodb/tests/unit/rest/tests/viewRow.test.ts

46
packages/nocodb/tests/unit/rest/tests/tableRow.test.ts

@ -427,10 +427,6 @@ function tableTest() {
relatedTableColumnTitle: 'FirstName', relatedTableColumnTitle: 'FirstName',
}); });
const paymentListColumn = (await rentalTable.getColumns()).find(
(c) => c.title === 'Payment List',
);
const nestedFilter = { const nestedFilter = {
is_group: true, is_group: true,
status: 'create', status: 'create',
@ -443,12 +439,6 @@ function tableTest() {
comparison_op: 'like', comparison_op: 'like',
value: '%a%', value: '%a%',
}, },
{
fk_column_id: paymentListColumn?.id,
status: 'create',
logical_op: 'and',
comparison_op: 'notblank',
},
], ],
}; };
@ -513,10 +503,6 @@ function tableTest() {
relatedTableColumnTitle: 'FirstName', relatedTableColumnTitle: 'FirstName',
}); });
const paymentListColumn = (await rentalTable.getColumns()).find(
(c) => c.title === 'Payment List',
);
const returnDateColumn = (await rentalTable.getColumns()).find( const returnDateColumn = (await rentalTable.getColumns()).find(
(c) => c.title === 'ReturnDate', (c) => c.title === 'ReturnDate',
); );
@ -533,12 +519,6 @@ function tableTest() {
comparison_op: 'like', comparison_op: 'like',
value: '%a%', value: '%a%',
}, },
{
fk_column_id: paymentListColumn?.id,
status: 'create',
logical_op: 'and',
comparison_op: 'notblank',
},
{ {
is_group: true, is_group: true,
status: 'create', status: 'create',
@ -786,10 +766,6 @@ function tableTest() {
relatedTableColumnTitle: 'RentalDate', relatedTableColumnTitle: 'RentalDate',
}); });
const paymentListColumn = (await customerTable.getColumns()).find(
(c) => c.title === 'Payment List',
);
const activeColumn = (await customerTable.getColumns()).find( const activeColumn = (await customerTable.getColumns()).find(
(c) => c.title === 'Active', (c) => c.title === 'Active',
); );
@ -818,12 +794,6 @@ function tableTest() {
comparison_op: 'lte', comparison_op: 'lte',
value: 30, value: 30,
}, },
{
fk_column_id: paymentListColumn?.id,
status: 'create',
logical_op: 'and',
comparison_op: 'notblank',
},
{ {
is_group: true, is_group: true,
status: 'create', status: 'create',
@ -1097,10 +1067,6 @@ function tableTest() {
relatedTableColumnTitle: 'RentalDate', relatedTableColumnTitle: 'RentalDate',
}); });
const paymentListColumn = (await customerTable.getColumns()).find(
(c) => c.title === 'Payment List',
);
const activeColumn = (await customerTable.getColumns()).find( const activeColumn = (await customerTable.getColumns()).find(
(c) => c.title === 'Active', (c) => c.title === 'Active',
); );
@ -1131,12 +1097,6 @@ function tableTest() {
comparison_op: 'lte', comparison_op: 'lte',
value: 30, value: 30,
}, },
{
fk_column_id: paymentListColumn?.id,
status: 'create',
logical_op: 'and',
comparison_op: 'notblank',
},
{ {
is_group: true, is_group: true,
status: 'create', status: 'create',
@ -1295,7 +1255,11 @@ function tableTest() {
.expect(200); .expect(200);
const record = response.body; const record = response.body;
expect(record['Film List']).to.equal(19); if (isPg(context)) {
expect(record['Film List']).to.equal('19');
} else {
expect(record['Film List']).to.equal(19);
}
}); });
it('Update table row', async function () { it('Update table row', async function () {

30
packages/nocodb/tests/unit/rest/tests/viewRow.test.ts

@ -521,10 +521,6 @@ function viewRowTests() {
relatedTableColumnTitle: 'FirstName', relatedTableColumnTitle: 'FirstName',
}); });
const paymentListColumn = (await rentalTable.getColumns()).find(
(c) => c.title === 'Payment List',
);
const nestedFilter = { const nestedFilter = {
is_group: true, is_group: true,
status: 'create', status: 'create',
@ -537,12 +533,6 @@ function viewRowTests() {
comparison_op: 'like', comparison_op: 'like',
value: '%a%', value: '%a%',
}, },
{
fk_column_id: paymentListColumn?.id,
status: 'create',
logical_op: 'and',
comparison_op: 'notblank',
},
], ],
}; };
@ -622,10 +612,6 @@ function viewRowTests() {
relatedTableColumnTitle: 'RentalDate', relatedTableColumnTitle: 'RentalDate',
}); });
const paymentListColumn = (await customerTable.getColumns()).find(
(c) => c.title === 'Payment List',
);
const activeColumn = (await customerTable.getColumns()).find( const activeColumn = (await customerTable.getColumns()).find(
(c) => c.title === 'Active', (c) => c.title === 'Active',
); );
@ -654,12 +640,6 @@ function viewRowTests() {
comparison_op: 'lte', comparison_op: 'lte',
value: 30, value: 30,
}, },
{
fk_column_id: paymentListColumn?.id,
status: 'create',
logical_op: 'and',
comparison_op: 'notblank',
},
{ {
is_group: true, is_group: true,
status: 'create', status: 'create',
@ -879,10 +859,6 @@ function viewRowTests() {
attr: { show: true }, attr: { show: true },
}); });
const paymentListColumn = (await customerTable.getColumns()).find(
(c) => c.title === 'Payment List',
);
const activeColumn = (await customerTable.getColumns()).find( const activeColumn = (await customerTable.getColumns()).find(
(c) => c.title === 'Active', (c) => c.title === 'Active',
); );
@ -911,12 +887,6 @@ function viewRowTests() {
comparison_op: 'lte', comparison_op: 'lte',
value: 30, value: 30,
}, },
{
fk_column_id: paymentListColumn?.id,
status: 'create',
logical_op: 'and',
comparison_op: 'notblank',
},
{ {
is_group: true, is_group: true,
status: 'create', status: 'create',

Loading…
Cancel
Save