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,11 +1,12 @@
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { within } from '@storybook/testing-library';
|
||||
import { HttpResponse, graphql } from 'msw';
|
||||
|
||||
import { TimelineActivityContext } from '@/activities/timeline-activities/contexts/TimelineActivityContext';
|
||||
import { EventCardMessage } from '@/activities/timeline-activities/rows/message/components/EventCardMessage';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
|
||||
const meta: Meta<typeof EventCardMessage> = {
|
||||
title: 'Modules/TimelineActivities/Rows/Message/EventCardMessage',
|
||||
@ -32,6 +33,11 @@ export const Default: Story = {
|
||||
messageId: '1',
|
||||
authorFullName: 'John Doe',
|
||||
},
|
||||
play: async ({ canvasElement }) => {
|
||||
const canvas = within(canvasElement);
|
||||
|
||||
await canvas.findByText('Mock title');
|
||||
},
|
||||
parameters: {
|
||||
msw: {
|
||||
handlers: [
|
||||
@ -57,6 +63,11 @@ export const NotShared: Story = {
|
||||
messageId: '1',
|
||||
authorFullName: 'John Doe',
|
||||
},
|
||||
play: async ({ canvasElement }) => {
|
||||
const canvas = within(canvasElement);
|
||||
|
||||
await canvas.findByText('Subject not shared');
|
||||
},
|
||||
parameters: {
|
||||
msw: {
|
||||
handlers: [
|
||||
|
||||
Reference in New Issue
Block a user