forked from twentyhq/twenty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Activity timeline refactoring followup (twentyhq#5835)
Following twentyhq#5697, addressing review
- Loading branch information
Showing
31 changed files
with
607 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
...imelineActivities/rows/calendar/components/__stories__/EventCardCalendarEvent.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import { graphql, HttpResponse } from 'msw'; | ||
import { ComponentDecorator } from 'twenty-ui'; | ||
|
||
import { EventCardCalendarEvent } from '@/activities/timelineActivities/rows/calendar/components/EventCardCalendarEvent'; | ||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator'; | ||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator'; | ||
|
||
const meta: Meta<typeof EventCardCalendarEvent> = { | ||
title: 'Modules/TimelineActivities/Rows/CalendarEvent/EventCardCalendarEvent', | ||
component: EventCardCalendarEvent, | ||
decorators: [ | ||
ComponentDecorator, | ||
ObjectMetadataItemsDecorator, | ||
SnackBarDecorator, | ||
], | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof EventCardCalendarEvent>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
calendarEventId: '1', | ||
}, | ||
parameters: { | ||
msw: { | ||
handlers: [ | ||
graphql.query('FindOneCalendarEvent', () => { | ||
return HttpResponse.json({ | ||
data: { | ||
calendarEvent: { | ||
id: '1', | ||
title: 'Mock title', | ||
startsAt: '2022-01-01T00:00:00Z', | ||
endsAt: '2022-01-01T01:00:00Z', | ||
}, | ||
}, | ||
}); | ||
}), | ||
], | ||
}, | ||
}, | ||
}; | ||
|
||
export const NotShared: Story = { | ||
args: { | ||
calendarEventId: '1', | ||
}, | ||
parameters: { | ||
msw: { | ||
handlers: [ | ||
graphql.query('FindOneCalendarEvent', () => { | ||
return HttpResponse.json({ | ||
errors: [ | ||
{ | ||
message: 'Forbidden', | ||
extensions: { | ||
code: 'FORBIDDEN', | ||
}, | ||
}, | ||
], | ||
}); | ||
}), | ||
], | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.