mirror of
https://github.com/twentyhq/twenty.git
synced 2025-01-03 17:53:58 +03:00
Use seed for id generation in tests (#585)
* Use seed for id generation in tests
* Revert "Use seed for id generation in tests"
This reverts commit c5ae9ac6bf
.
* Add hardcoded ids
This commit is contained in:
parent
718ad721cf
commit
24bc2b72f9
@ -1,6 +1,5 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
import { DateTime } from 'luxon';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
import { CommentForDrawer } from '@/comments/types/CommentForDrawer';
|
||||
import { mockedUsersData } from '~/testing/mock-data/users';
|
||||
@ -20,9 +19,9 @@ type Story = StoryObj<typeof CommentHeader>;
|
||||
const mockUser = mockedUsersData[0];
|
||||
|
||||
const mockComment: Pick<CommentForDrawer, 'id' | 'author' | 'createdAt'> = {
|
||||
id: v4(),
|
||||
id: 'fake_comment_1_uuid',
|
||||
author: {
|
||||
id: v4(),
|
||||
id: 'fake_comment_1_author_uuid',
|
||||
displayName: mockUser.displayName ?? '',
|
||||
firstName: mockUser.firstName ?? '',
|
||||
lastName: mockUser.lastName ?? '',
|
||||
@ -35,9 +34,9 @@ const mockCommentWithLongName: Pick<
|
||||
CommentForDrawer,
|
||||
'id' | 'author' | 'createdAt'
|
||||
> = {
|
||||
id: v4(),
|
||||
id: 'fake_comment_2_uuid',
|
||||
author: {
|
||||
id: v4(),
|
||||
id: 'fake_comment_2_author_uuid',
|
||||
displayName: mockUser.displayName + ' with a very long suffix' ?? '',
|
||||
firstName: mockUser.firstName ?? '',
|
||||
lastName: mockUser.lastName ?? '',
|
||||
|
Loading…
Reference in New Issue
Block a user