From ef3f726346fb4dfba1f78c60b18e7108804c957c Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 12 Sep 2024 16:23:00 +0100 Subject: [PATCH] Fixing test cases. --- packages/backend-core/tests/core/utilities/mocks/licenses.ts | 4 ---- packages/server/src/api/routes/tests/rowAction.spec.ts | 4 ---- packages/server/src/api/routes/tests/viewV2.spec.ts | 1 - packages/types/src/sdk/licensing/feature.ts | 1 + 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/backend-core/tests/core/utilities/mocks/licenses.ts b/packages/backend-core/tests/core/utilities/mocks/licenses.ts index ec7d2af794..2d8e81d125 100644 --- a/packages/backend-core/tests/core/utilities/mocks/licenses.ts +++ b/packages/backend-core/tests/core/utilities/mocks/licenses.ts @@ -102,10 +102,6 @@ export const useAppBuilders = () => { return useFeature(Feature.APP_BUILDERS) } -export const useViewPermissions = () => { - return useFeature(Feature.VIEW_PERMISSIONS) -} - export const useViewReadonlyColumns = () => { return useFeature(Feature.VIEW_READONLY_COLUMNS) } diff --git a/packages/server/src/api/routes/tests/rowAction.spec.ts b/packages/server/src/api/routes/tests/rowAction.spec.ts index 3f4447c50d..ef7d2afbba 100644 --- a/packages/server/src/api/routes/tests/rowAction.spec.ts +++ b/packages/server/src/api/routes/tests/rowAction.spec.ts @@ -763,10 +763,6 @@ describe("/rowsActions", () => { }) describe("role permission checks", () => { - beforeAll(() => { - mocks.licenses.useViewPermissions() - }) - afterAll(() => { mocks.licenses.useCloudFree() }) diff --git a/packages/server/src/api/routes/tests/viewV2.spec.ts b/packages/server/src/api/routes/tests/viewV2.spec.ts index 3ca28f31aa..f86291e9cd 100644 --- a/packages/server/src/api/routes/tests/viewV2.spec.ts +++ b/packages/server/src/api/routes/tests/viewV2.spec.ts @@ -2297,7 +2297,6 @@ describe.each([ describe("permissions", () => { beforeEach(async () => { - mocks.licenses.useViewPermissions() await Promise.all( Array.from({ length: 10 }, () => config.api.row.save(table._id!, {})) ) diff --git a/packages/types/src/sdk/licensing/feature.ts b/packages/types/src/sdk/licensing/feature.ts index 9d09f1d14f..286faaa218 100644 --- a/packages/types/src/sdk/licensing/feature.ts +++ b/packages/types/src/sdk/licensing/feature.ts @@ -13,6 +13,7 @@ export enum Feature { APP_BUILDERS = "appBuilders", OFFLINE = "offline", EXPANDED_PUBLIC_API = "expandedPublicApi", + // deprecated - no longer licensed VIEW_PERMISSIONS = "viewPermissions", VIEW_READONLY_COLUMNS = "viewReadonlyColumns", BUDIBASE_AI = "budibaseAI",