From b81e43ed59855c15abce129894eeabf1637e7ba8 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 18 Dec 2024 10:55:32 +0100 Subject: [PATCH] Fix tests --- packages/server/src/api/routes/tests/viewV2.spec.ts | 2 +- packages/server/src/tests/utilities/api/viewV2.ts | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/server/src/api/routes/tests/viewV2.spec.ts b/packages/server/src/api/routes/tests/viewV2.spec.ts index 632dbfec3a..ba2ad422eb 100644 --- a/packages/server/src/api/routes/tests/viewV2.spec.ts +++ b/packages/server/src/api/routes/tests/viewV2.spec.ts @@ -1902,7 +1902,7 @@ if (descriptions.length) { it("tables and views can contain whitespaces", async () => { const table = await config.api.table.save( saveTableRequest({ - name: "table with spaces", + name: `table with spaces ${generator.hash()}`, schema: { name: { type: FieldType.STRING, diff --git a/packages/server/src/tests/utilities/api/viewV2.ts b/packages/server/src/tests/utilities/api/viewV2.ts index 7cc57673a0..d0350a5521 100644 --- a/packages/server/src/tests/utilities/api/viewV2.ts +++ b/packages/server/src/tests/utilities/api/viewV2.ts @@ -46,8 +46,11 @@ export class ViewV2API extends TestAPI { } get = async (viewId: string) => { - return (await this._get(`/api/v2/views/${viewId}`)) - .data + return ( + await this._get( + `/api/v2/views/${encodeURIComponent(viewId)}` + ) + ).data } fetch = async (expectations?: Expectations) => {