From c3542b718e61bff83eccd44830d8ca093462d656 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 16 Nov 2023 12:24:23 +0000 Subject: [PATCH] refactor: test correction --- packages/nocodb/tests/unit/rest/tests/groupby.test.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/nocodb/tests/unit/rest/tests/groupby.test.ts b/packages/nocodb/tests/unit/rest/tests/groupby.test.ts index 8c61ece1ca..a9c5883cab 100644 --- a/packages/nocodb/tests/unit/rest/tests/groupby.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/groupby.test.ts @@ -299,7 +299,7 @@ function groupByTests() { expect(response.body.list.length).to.equal(1); }); - it('Check One GroupBy Column with MM Lookup which is not supported', async function () { + it.only('Check One GroupBy Column with MM Lookup which is supported', async function () { await createLookupColumn(context, { base: sakilaProject, title: 'ActorNames', @@ -308,15 +308,17 @@ function groupByTests() { relatedTableColumnTitle: 'FirstName', }); - const res = await request(context.app) + const response = await request(context.app) .get(`/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) .set('xc-auth', context.token) .query({ column_name: 'ActorNames', }) - .expect(400); + .expect(200); - assert.match(res.body.msg, /not supported/); + assert.match(response.body.list[0]['ActorNames'], /ADAM/); + expect(+response.body.list[0]['count']).to.gt(1); + expect(response.body.list.length).to.equal(25); }); it('Check One GroupBy Column with Formula and Formula referring another formula', async function () {