The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Raise coverage (#6441)
Charles Bochet0a21a16eb03a
diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventParticipantsResponseStatusField.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventParticipantsResponseStatusField.tsxindex 14ccd69a209..2f29177c532 100644--- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventParticipantsResponseStatusField.tsx+++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventParticipantsResponseStatusField.tsx@@ -1,6 +1,6 @@-import { useRef } from 'react';import { useTheme } from '@emotion/react';import styled from '@emotion/styled';+import { useRef } from 'react';import { useRecoilValue } from 'recoil';import { IconCheck, IconQuestionMark, IconX } from 'twenty-ui';@@ -9,7 +9,7 @@ import { ParticipantChip } from '@/activities/components/ParticipantChip';import { PropertyBox } from '@/object-record/record-inline-cell/property-box/components/PropertyBox';import { EllipsisDisplay } from '@/ui/field/display/components/EllipsisDisplay';import { ExpandableList } from '@/ui/layout/expandable-list/components/ExpandableList';-import { isRightDrawerAnimationCompletedState } from '@/ui/layout/right-drawer/states/isRightDrawerAnimationCompleted';+import { isRightDrawerAnimationCompletedState } from '@/ui/layout/right-drawer/states/isRightDrawerAnimationCompletedState';const StyledInlineCellBaseContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/activities/components/ActivityEditorFields.tsx b/packages/twenty-front/src/modules/activities/components/ActivityEditorFields.tsxindex e8b18925854..e29b774b6cd 100644--- a/packages/twenty-front/src/modules/activities/components/ActivityEditorFields.tsx+++ b/packages/twenty-front/src/modules/activities/components/ActivityEditorFields.tsx@@ -14,7 +14,7 @@ import {import { RecordInlineCell } from '@/object-record/record-inline-cell/components/RecordInlineCell';import { PropertyBox } from '@/object-record/record-inline-cell/property-box/components/PropertyBox';import { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';-import { isRightDrawerAnimationCompletedState } from '@/ui/layout/right-drawer/states/isRightDrawerAnimationCompleted';+import { isRightDrawerAnimationCompletedState } from '@/ui/layout/right-drawer/states/isRightDrawerAnimationCompletedState';import { isDefined } from '~/utils/isDefined';const StyledPropertyBox = styled(PropertyBox)`diff --git a/packages/twenty-front/src/modules/activities/inline-cell/components/ActivityTargetInlineCellEditMode.tsx b/packages/twenty-front/src/modules/activities/inline-cell/components/ActivityTargetInlineCellEditMode.tsxindex 0b85e20074b..5ebc528263b 100644--- a/packages/twenty-front/src/modules/activities/inline-cell/components/ActivityTargetInlineCellEditMode.tsx+++ b/packages/twenty-front/src/modules/activities/inline-cell/components/ActivityTargetInlineCellEditMode.tsx@@ -10,7 +10,6 @@ import { Activity } from '@/activities/types/Activity';import { ActivityTarget } from '@/activities/types/ActivityTarget';import { ActivityTargetWithTargetRecord } from '@/activities/types/ActivityTargetObject';import { getActivityTargetObjectFieldIdName } from '@/activities/utils/getActivityTargetObjectFieldIdName';-import { getActivityTargetObjectFieldName } from '@/activities/utils/getActivityTargetObjectFieldName';import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';import { useCreateManyRecordsInCache } from '@/object-record/cache/hooks/useCreateManyRecordsInCache';@@ -163,9 +162,7 @@ export const ActivityTargetInlineCellEditMode = ({);const newActivityTargetId = v4();- const fieldName = getActivityTargetObjectFieldName({- nameSingular: record.objectMetadataItem.nameSingular,- });+ const fieldName = record.objectMetadataItem.nameSingular;const fieldNameWithIdSuffix = getActivityTargetObjectFieldIdName({nameSingular: record.objectMetadataItem.nameSingular,});diff --git a/packages/twenty-front/src/modules/activities/utils/getActivityTargetObjectFieldName.ts b/packages/twenty-front/src/modules/activities/utils/getActivityTargetObjectFieldName.tsdeleted file mode 100644index a4081e2a108..00000000000--- a/packages/twenty-front/src/modules/activities/utils/getActivityTargetObjectFieldName.ts+++ /dev/null@@ -1,7 +0,0 @@-export const getActivityTargetObjectFieldName = ({- nameSingular,-}: {- nameSingular: string;-}) => {- return `${nameSingular}`;-};diff --git a/packages/twenty-front/src/modules/ui/layout/right-drawer/components/RightDrawer.tsx b/packages/twenty-front/src/modules/ui/layout/right-drawer/components/RightDrawer.tsxindex 0fc54fbdaf3..1da369918f1 100644--- a/packages/twenty-front/src/modules/ui/layout/right-drawer/components/RightDrawer.tsx+++ b/packages/twenty-front/src/modules/ui/layout/right-drawer/components/RightDrawer.tsx@@ -1,12 +1,12 @@-import { useRef } from 'react';import { useTheme } from '@emotion/react';import styled from '@emotion/styled';import { motion } from 'framer-motion';+import { useRef } from 'react';import { useRecoilCallback, useRecoilState, useRecoilValue } from 'recoil';import { Key } from 'ts-key-enum';import { RIGHT_DRAWER_CLICK_OUTSIDE_LISTENER_ID } from '@/ui/layout/right-drawer/constants/RightDrawerClickOutsideListener';-import { isRightDrawerAnimationCompletedState } from '@/ui/layout/right-drawer/states/isRightDrawerAnimationCompleted';+import { isRightDrawerAnimationCompletedState } from '@/ui/layout/right-drawer/states/isRightDrawerAnimationCompletedState';import { isRightDrawerMinimizedState } from '@/ui/layout/right-drawer/states/isRightDrawerMinimizedState';import { rightDrawerCloseEventState } from '@/ui/layout/right-drawer/states/rightDrawerCloseEventsState';import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';diff --git a/packages/twenty-front/src/modules/ui/layout/right-drawer/states/isRightDrawerAnimationCompleted.ts b/packages/twenty-front/src/modules/ui/layout/right-drawer/states/isRightDrawerAnimationCompletedState.tssimilarity index 100%rename from packages/twenty-front/src/modules/ui/layout/right-drawer/states/isRightDrawerAnimationCompleted.tsrename to packages/twenty-front/src/modules/ui/layout/right-drawer/states/isRightDrawerAnimationCompletedState.tsdiff --git a/packages/twenty-front/src/utils/__tests__/isValidUuid.test.ts b/packages/twenty-front/src/utils/__tests__/isValidUuid.test.tsnew file mode 100644index 00000000000..768972b539f--- /dev/null+++ b/packages/twenty-front/src/utils/__tests__/isValidUuid.test.ts@@ -0,0 +1,11 @@+import { isValidUuid } from '~/utils/isValidUuid';++describe('isValidUuid', () => {+ it('returns true if value is a valid UUID', () => {+ expect(isValidUuid('bec09e27-4ecc-4a85-afc1-f2c0ace28bfa')).toBe(true);+ });++ it('returns false if value is not a valid UUID', () => {+ expect(isValidUuid('123e4567-e89b-12d3-a456-42661417400')).toBe(false);+ });+});