Skip to content

The open alternative to Salesforce, designed for AI.

Fixed storybook tests (#3719)

Lucas Bordeau397de955beed
diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/constants/RatingValues.ts b/packages/twenty-front/src/modules/object-record/record-field/meta-types/constants/RatingValues.ts
new file mode 100644
index 00000000000..9443fcbd105
--- /dev/null
+++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/constants/RatingValues.ts
@@ -0,0 +1,7 @@
+export const RATING_VALUES = [
+ 'RATING_1',
+ 'RATING_2',
+ 'RATING_3',
+ 'RATING_4',
+ 'RATING_5',
+] as const;
diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/RatingFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/RatingFieldInput.tsx
index 300276b73c7..447be4f0631 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/RatingFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/RatingFieldInput.tsx
@@ -11,14 +11,6 @@ export type RatingFieldInputProps = {
readonly?: boolean;
};
-export const RATING_VALUES = [
- 'RATING_1',
- 'RATING_2',
- 'RATING_3',
- 'RATING_4',
- 'RATING_5',
-] as const;
-
export const RatingFieldInput = ({
onSubmit,
readonly,
diff --git a/packages/twenty-front/src/modules/object-record/record-field/types/FieldMetadata.ts b/packages/twenty-front/src/modules/object-record/record-field/types/FieldMetadata.ts
index 634df5dfe55..1f0d498eac9 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/types/FieldMetadata.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/types/FieldMetadata.ts
@@ -1,4 +1,4 @@
-import { RATING_VALUES } from '@/object-record/record-field/meta-types/input/components/RatingFieldInput';
+import { RATING_VALUES } from '@/object-record/record-field/meta-types/constants/RatingValues';
import { EntityForSelect } from '@/object-record/relation-picker/types/EntityForSelect';
import { ThemeColor } from '@/ui/theme/constants/colors';
diff --git a/packages/twenty-front/src/modules/object-record/record-field/types/guards/isFieldRatingValue.ts b/packages/twenty-front/src/modules/object-record/record-field/types/guards/isFieldRatingValue.ts
index 484ecb3fbc5..3fc8459a08d 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/types/guards/isFieldRatingValue.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/types/guards/isFieldRatingValue.ts
@@ -1,6 +1,7 @@
import { z } from 'zod';
-import { RATING_VALUES } from '../../meta-types/input/components/RatingFieldInput';
+import { RATING_VALUES } from '@/object-record/record-field/meta-types/constants/RatingValues';
+
import { FieldRatingValue } from '../FieldMetadata';
const ratingSchema = z.string().pipe(z.enum(RATING_VALUES));
diff --git a/packages/twenty-front/src/modules/ui/field/input/components/RatingInput.tsx b/packages/twenty-front/src/modules/ui/field/input/components/RatingInput.tsx
index 2da9519e8ce..ce16119264b 100644
--- a/packages/twenty-front/src/modules/ui/field/input/components/RatingInput.tsx
+++ b/packages/twenty-front/src/modules/ui/field/input/components/RatingInput.tsx
@@ -2,7 +2,7 @@ import { useState } from 'react';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
-import { RATING_VALUES } from '@/object-record/record-field/meta-types/input/components/RatingFieldInput';
+import { RATING_VALUES } from '@/object-record/record-field/meta-types/constants/RatingValues';
import { FieldRatingValue } from '@/object-record/record-field/types/FieldMetadata';
import { IconTwentyStarFilled } from '@/ui/display/icon/components/IconTwentyStarFilled';
diff --git a/packages/twenty-front/src/pages/not-found/__stories__/NotFound.stories.tsx b/packages/twenty-front/src/pages/not-found/__stories__/NotFound.stories.tsx
index ea882904fc4..08ece6bf3be 100644
--- a/packages/twenty-front/src/pages/not-found/__stories__/NotFound.stories.tsx
+++ b/packages/twenty-front/src/pages/not-found/__stories__/NotFound.stories.tsx
@@ -31,6 +31,6 @@ export type Story = StoryObj<typeof NotFound>;
export const Default: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
- await canvas.findByText('Page not found');
+ await canvas.findByText('Off the beaten path');
},
};