Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

adjust several test cases

Fendy Heryantoe42fb3ca6aea
diff --git a/packages/nocodb/tests/unit/rest/tests/dataApiV3/error-handling.test.ts b/packages/nocodb/tests/unit/rest/tests/dataApiV3/error-handling.test.ts
index 3daf6e47e5..68ebce711f 100644
--- a/packages/nocodb/tests/unit/rest/tests/dataApiV3/error-handling.test.ts
+++ b/packages/nocodb/tests/unit/rest/tests/dataApiV3/error-handling.test.ts
@@ -339,7 +339,7 @@ describe('dataApiV3', () => {
});
expect(response.body.error).to.eq('INVALID_PK_VALUE');
expect(response.body.message).to.eq(
- `Primary key value 'text-primary-key' is invalid for column 'id'`,
+ `Primary key value 'text-primary-key' is invalid for column 'Id'`,
);
});
diff --git a/packages/nocodb/tests/unit/rest/tests/typeCasts.test.ts b/packages/nocodb/tests/unit/rest/tests/typeCasts.test.ts
index b4d5aea691..bcf47703bb 100644
--- a/packages/nocodb/tests/unit/rest/tests/typeCasts.test.ts
+++ b/packages/nocodb/tests/unit/rest/tests/typeCasts.test.ts
@@ -49,13 +49,13 @@ async function setup(context, base: Base, type: UITypes) {
],
});
- // Table will miss ID column (API v2 behavior) so we target 5th index
+ // get the column based on col title
const column = (
await table.getColumns({
workspace_id: base.fk_workspace_id,
base_id: base.id,
})
- )[5];
+ ).find((col) => col.title === 'Test');
const rowAttributes = [];
for (let i = 0; i < 100; i++) {