Fix and enhance storybook:modules:tests (#3107)
* Fix and enhance storybook:modules:tests Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com> * Fix and enhance storybook:modules:tests Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com> * Fix and enhance storybook:modules:tests Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com> * Remove unnecessary changes Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com> * Fix email thread story * Re-enable storybook:modules * Fix --------- Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -11,6 +11,7 @@ import { mockedCompaniesData } from '~/testing/mock-data/companies';
|
||||
import { mockedClientConfig } from '~/testing/mock-data/config';
|
||||
import { mockedPipelineSteps } from '~/testing/mock-data/pipeline-steps';
|
||||
import { mockedUsersData } from '~/testing/mock-data/users';
|
||||
import { mockWorkspaceMembers } from '~/testing/mock-data/workspace-members';
|
||||
|
||||
import { mockedObjectMetadataItems } from './mock-data/metadata';
|
||||
import { mockedPeopleData } from './mock-data/people';
|
||||
@ -236,5 +237,57 @@ export const graphqlMocks = {
|
||||
},
|
||||
});
|
||||
}),
|
||||
graphql.query('FindManyWorkspaceMembers', () => {
|
||||
return HttpResponse.json({
|
||||
data: {
|
||||
workspaceMembers: {
|
||||
edges: mockWorkspaceMembers.map((member) => ({
|
||||
node: {
|
||||
...member,
|
||||
messageRecipients: {
|
||||
edges: [],
|
||||
__typename: 'MessageRecipientConnection',
|
||||
},
|
||||
authoredAttachments: {
|
||||
edges: [],
|
||||
__typename: 'AttachmentConnection',
|
||||
},
|
||||
authoredComments: {
|
||||
edges: [],
|
||||
__typename: 'CommentConnection',
|
||||
},
|
||||
accountOwnerForCompanies: {
|
||||
edges: [],
|
||||
__typename: 'CompanyConnection',
|
||||
},
|
||||
authoredActivities: {
|
||||
edges: [],
|
||||
__typename: 'ActivityConnection',
|
||||
},
|
||||
favorites: {
|
||||
edges: [],
|
||||
__typename: 'FavoriteConnection',
|
||||
},
|
||||
connectedAccounts: {
|
||||
edges: [],
|
||||
__typename: 'ConnectedAccountConnection',
|
||||
},
|
||||
assignedActivities: {
|
||||
edges: [],
|
||||
__typename: 'ActivityConnection',
|
||||
},
|
||||
},
|
||||
cursor: null,
|
||||
})),
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
export const mockWorkspaceMembers = [
|
||||
{
|
||||
id: '20202020-1553-45c6-a028-5a9064cce07f',
|
||||
name: {
|
||||
firstName: 'Jane',
|
||||
lastName: 'Doe',
|
||||
},
|
||||
locale: 'en',
|
||||
avatarUrl: '',
|
||||
createdAt: '2023-12-18T09:51:19.645Z',
|
||||
updatedAt: '2023-12-18T09:51:19.645Z',
|
||||
userId: '20202020-7169-42cf-bc47-1cfef15264b8',
|
||||
colorScheme: 'Light',
|
||||
},
|
||||
{
|
||||
id: '20202020-77d5-4cb6-b60a-f4a835a85d61',
|
||||
name: {
|
||||
firstName: 'John',
|
||||
lastName: 'Wick',
|
||||
},
|
||||
locale: 'en',
|
||||
avatarUrl: '',
|
||||
createdAt: '2023-12-18T09:51:19.645Z',
|
||||
updatedAt: '2023-12-18T09:51:19.645Z',
|
||||
userId: '20202020-3957-4908-9c36-2929a23f8357',
|
||||
colorScheme: 'Light',
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user