Improve storybook stories (#11694)
## Improvements ### TaskGroups <img width="1512" alt="image" src="https://github.com/user-attachments/assets/0dbd71fe-3999-4cf5-870e-565b8e2df1b9" /> ### EventCardMessage <img width="1512" alt="image" src="https://github.com/user-attachments/assets/b41cddc1-3ff2-411f-9ac6-8d4035579e54" /> ### Blocklist stories <img width="1512" alt="image" src="https://github.com/user-attachments/assets/e997a0c1-e7e2-4ea4-9253-f31609ee44df" /> ### WorkflowEditActionUpdateRecord <img width="1512" alt="image" src="https://github.com/user-attachments/assets/275dab17-ad33-4174-8671-31ba455c20a4" />
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
import { Decorator, Meta, StoryObj } from '@storybook/react';
|
||||
import { expect, fn, userEvent, within } from '@storybook/test';
|
||||
|
||||
import { mockedBlocklist } from '@/settings/accounts/components/__stories__/mockedBlocklist';
|
||||
import { SettingsAccountsBlocklistTableRow } from '@/settings/accounts/components/SettingsAccountsBlocklistTableRow';
|
||||
import { formatToHumanReadableDate } from '~/utils/date-utils';
|
||||
import { mockedBlocklist } from '@/settings/accounts/components/__stories__/mockedBlocklist';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { formatToHumanReadableDate } from '~/utils/date-utils';
|
||||
|
||||
const onRemoveJestFn = fn();
|
||||
|
||||
|
||||
@ -7,28 +7,40 @@ export const mockedBlocklist: BlocklistItem[] = [
|
||||
id: '1',
|
||||
handle: 'test1@twenty.com',
|
||||
workspaceMemberId: '1',
|
||||
createdAt: DateTime.now().minus({ hours: 2 }).toISO() ?? '',
|
||||
createdAt:
|
||||
DateTime.fromISO('2023-04-26T10:12:42.33625+00:00')
|
||||
.minus({ hours: 2 })
|
||||
.toISO() ?? '',
|
||||
__typename: 'BlocklistItem',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
handle: 'test2@twenty.com',
|
||||
workspaceMemberId: '1',
|
||||
createdAt: DateTime.now().minus({ days: 2 }).toISO() ?? '',
|
||||
createdAt:
|
||||
DateTime.fromISO('2023-04-26T10:12:42.33625+00:00')
|
||||
.minus({ days: 2 })
|
||||
.toISO() ?? '',
|
||||
__typename: 'BlocklistItem',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
handle: 'test3@twenty.com',
|
||||
workspaceMemberId: '1',
|
||||
createdAt: DateTime.now().minus({ days: 3 }).toISO() ?? '',
|
||||
createdAt:
|
||||
DateTime.fromISO('2023-04-26T10:12:42.33625+00:00')
|
||||
.minus({ days: 3 })
|
||||
.toISO() ?? '',
|
||||
__typename: 'BlocklistItem',
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
handle: '@twenty.com',
|
||||
workspaceMemberId: '1',
|
||||
createdAt: DateTime.now().minus({ days: 4 }).toISO() ?? '',
|
||||
createdAt:
|
||||
DateTime.fromISO('2023-04-26T10:12:42.33625+00:00')
|
||||
.minus({ days: 4 })
|
||||
.toISO() ?? '',
|
||||
__typename: 'BlocklistItem',
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user