mirror of
https://github.com/lingble/twenty.git
synced 2025-10-29 20:02:29 +00:00
Fix storybook tests
This commit is contained in:
@@ -113,6 +113,33 @@ export const graphqlMocks = {
|
||||
},
|
||||
});
|
||||
}),
|
||||
graphql.query('FindManyViews', ({ variables }) => {
|
||||
const objectMetadataId = variables.filter?.objectMetadataId?.eq;
|
||||
const viewType = variables.filter?.type?.eq;
|
||||
|
||||
return HttpResponse.json({
|
||||
data: {
|
||||
views: {
|
||||
edges: mockedViewsData
|
||||
.filter(
|
||||
(view) =>
|
||||
view?.objectMetadataId === objectMetadataId &&
|
||||
view?.type === viewType,
|
||||
)
|
||||
.map((view) => ({
|
||||
node: view,
|
||||
cursor: null,
|
||||
})),
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}),
|
||||
graphql.query('SearchWorkspaceMembers', () => {
|
||||
return HttpResponse.json({
|
||||
data: {
|
||||
|
||||
@@ -25,7 +25,8 @@ export const mockedViewsData = [
|
||||
createdAt: '2021-09-01T00:00:00.000Z',
|
||||
updatedAt: '2021-09-01T00:00:00.000Z',
|
||||
isCompact: false,
|
||||
|
||||
viewFilterGroups: [],
|
||||
viewGroups: [],
|
||||
__typename: 'View',
|
||||
},
|
||||
{
|
||||
@@ -40,6 +41,8 @@ export const mockedViewsData = [
|
||||
createdAt: '2021-09-01T00:00:00.000Z',
|
||||
updatedAt: '2021-09-01T00:00:00.000Z',
|
||||
isCompact: false,
|
||||
viewFilterGroups: [],
|
||||
viewGroups: [],
|
||||
__typename: 'View',
|
||||
},
|
||||
{
|
||||
@@ -54,6 +57,8 @@ export const mockedViewsData = [
|
||||
createdAt: '2021-09-01T00:00:00.000Z',
|
||||
updatedAt: '2021-09-01T00:00:00.000Z',
|
||||
isCompact: false,
|
||||
viewFilterGroups: [],
|
||||
viewGroups: [],
|
||||
__typename: 'View',
|
||||
},
|
||||
{
|
||||
@@ -68,6 +73,8 @@ export const mockedViewsData = [
|
||||
createdAt: '2021-09-01T00:00:00.000Z',
|
||||
updatedAt: '2021-09-01T00:00:00.000Z',
|
||||
isCompact: false,
|
||||
viewFilterGroups: [],
|
||||
viewGroups: [],
|
||||
__typename: 'View',
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user