Browse Source

test: corrections in unit test

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/6489/head
Pranav C 1 year ago
parent
commit
b28952d9f2
  1. 10
      packages/nocodb/tests/unit/rest/tests/tableRow.test.ts

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

@ -1623,18 +1623,18 @@ function tableTest() {
.query({
fields: visibleColumns.map((c) => c.title),
sort: sortInfo,
column_name: firstNameColumn.column_name,
column_name: firstNameColumn.title,
})
.expect(200);
if (
response.body.list[4]['first_name'] !== 'WILLIE' ||
response.body.list[4][firstNameColumn.title] !== 'WILLIE' ||
parseInt(response.body.list[4]['count']) !== 2
)
throw new Error('Wrong groupby');
});
it('Groupby desc sorted and with rollup table data list with required columns', async function () {
it('Groupby desc sorted and with rollup tabl e data list with required columns', async function () {
const firstNameColumn = customerColumns.find(
(col) => col.title === 'FirstName',
);
@ -1659,13 +1659,13 @@ function tableTest() {
.query({
fields: visibleColumns.map((c) => c.title),
sort: sortInfo,
column_name: firstNameColumn.column_name,
column_name: firstNameColumn.title,
offset: 4,
})
.expect(200);
if (
response.body.list[0]['first_name'] !== 'WILLIE' ||
response.body.list[0][firstNameColumn.title] !== 'WILLIE' ||
parseInt(response.body.list[0]['count']) !== 2
)
throw new Error('Wrong groupby');

Loading…
Cancel
Save