diff --git a/.cursorrules b/.cursorrules index cfa0edb543db..d11cb229a874 100644 --- a/.cursorrules +++ b/.cursorrules @@ -1,14 +1,23 @@ -{ +export const rules = { "general": { - "description": "Twenty is an open source CRM built with React, NestJS, and PostgreSQL", + "description": "Twenty is an open source CRM built with Typescript (React, NestJS).", "main-packages": { - "frontend": "packages/twenty-front - React frontend application", - "server": "packages/twenty-server - NestJS backend application", - "website": "packages/twenty-website - Marketing website (includes some documentation)" + "twenty-front": "Main Frontend - React", + "twenty-server": "Main Backend - NestJS", + "twenty-website": "Marketing website (includes some documentation) - NextJS", + "twenty-ui": "UI library - React", + "twenty-shared": "Anything shared between multiple packages (e.g. utils, constants, types, etc.). Shouldn't be raw TS and not NestJS or React specific." }, "development": { "package-manager": "yarn", - "monorepo-tool": "nx" + "monorepo-tool": "nx", + "database": "PostgreSQL", + "orm": "TypeORM", + "orm-schema": "core, metadata", + "cahce": "redis", + "auth": "JWT", + "queue": "BullMQ", + "storage": "S3 or local filesystem" }, "common-commands": { "frontend": { @@ -116,4 +125,4 @@ "Follow proper test naming conventions" ] } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/packages/twenty-front/src/hooks/__tests__/usePageChangeEffectNavigateLocation.test.ts b/packages/twenty-front/src/hooks/__tests__/usePageChangeEffectNavigateLocation.test.ts index 4b687f68bbc1..b44fb13bb943 100644 --- a/packages/twenty-front/src/hooks/__tests__/usePageChangeEffectNavigateLocation.test.ts +++ b/packages/twenty-front/src/hooks/__tests__/usePageChangeEffectNavigateLocation.test.ts @@ -39,7 +39,7 @@ const setupMockIsLogged = (isLogged: boolean) => { }; jest.mock('@/billing/hooks/useBillingPlan'); -const setupMockBillingPlan = (plan: BillingPlanKey) => { +const setupMockBillingPlan = (plan: BillingPlanKey | null) => { jest.mocked(useBillingPlan).mockReturnValueOnce(plan); }; @@ -291,7 +291,7 @@ describe('usePageChangeEffectNavigateLocation', () => { setupMockOnboardingStatus(testCase.onboardingStatus); setupMockSubscriptionStatus(testCase.subscriptionStatus); setupMockIsLogged(testCase.isLoggedIn); - setupMockBillingPlan(BillingPlanKey.PRO); + setupMockBillingPlan(null); expect(usePageChangeEffectNavigateLocation()).toEqual(testCase.res); }); }); diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useBillingPlan.test.tsx b/packages/twenty-front/src/modules/billing/hooks/__tests__/useBillingPlan.test.tsx index 7060fc9d1cf8..bbff5dcc17f5 100644 --- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useBillingPlan.test.tsx +++ b/packages/twenty-front/src/modules/billing/hooks/__tests__/useBillingPlan.test.tsx @@ -12,12 +12,12 @@ const Wrapper = ({ children, initialUrl = '' }: any) => ( ); describe('useBillingPlan', () => { - it('should return FREE as default plan', () => { + it('should return null as default plan', () => { const { result } = renderHook(() => useBillingPlan(), { wrapper: Wrapper, }); - expect(result.current).toBe(BillingPlanKey.FREE); + expect(result.current).toBe(null); }); it('should set plan from URL parameter - FREE', () => { @@ -57,7 +57,7 @@ describe('useBillingPlan', () => { ), }); - expect(result.current).toBe(BillingPlanKey.FREE); + expect(result.current).toBe(null); }); it('should handle URL without plan parameter', () => { @@ -67,6 +67,6 @@ describe('useBillingPlan', () => { ), }); - expect(result.current).toBe(BillingPlanKey.FREE); + expect(result.current).toBe(null); }); });