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:
Emilien Chauvet 2023-07-11 10:58:22 -07:00 committed by GitHub
parent 718ad721cf
commit 24bc2b72f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ?? '',