Browse Source

test: pg corrections for UT

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

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

@ -2159,7 +2159,7 @@ function tableTest() {
const updatedRow = await getRow(context, { project, table, id: row['Id'] });
// LTAR now returns rollup count
if (updatedRow['Ltar'] !== 0) {
if (!(updatedRow['Ltar'] === 0 || updatedRow['Ltar'] === '0')) {
throw new Error('Was not deleted');
}

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

@ -19,6 +19,7 @@ import {
getOneRow,
getRow,
} from '../../factory/row';
import { isPg } from '../../init/db';
import type { ColumnType } from 'nocodb-sdk';
import type View from '../../../../src/models/View';
import type Model from '../../../../src/models/Model';
@ -681,7 +682,11 @@ function viewRowTests() {
throw new Error('Wrong filter');
}
expect(ascResponse.body.list[0]['Rental List']).to.equal(12);
if (isPg(context)) {
expect(ascResponse.body.list[0]['Rental List']).to.equal('12');
} else {
expect(ascResponse.body.list[0]['Rental List']).to.equal(12);
}
};
it('Get nested sorted filtered table with nested fields data list with a rollup column in customer table view grid', async () => {

Loading…
Cancel
Save