Fix Frontend modules tests (#2688)
* Fix naming issue Co-authored-by: gitstart-twenty <twenty@gitstart.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com> * Fix more tests Co-authored-by: gitstart-twenty <twenty@gitstart.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com> * Revert unnecessary changes Co-authored-by: gitstart-twenty <twenty@gitstart.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com> * Refactor according to self-review Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: gitstart-twenty <twenty@gitstart.com> Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com> * Fix graphql mocks not working anymore --------- 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:
@ -0,0 +1,9 @@
|
||||
import { Decorator } from '@storybook/react';
|
||||
|
||||
import { ObjectMetadataItemsProvider } from '@/object-metadata/components/ObjectMetadataItemsProvider';
|
||||
|
||||
export const ObjectMetadataItemsDecorator: Decorator = (Story) => (
|
||||
<ObjectMetadataItemsProvider>
|
||||
<Story />
|
||||
</ObjectMetadataItemsProvider>
|
||||
);
|
||||
@ -5,6 +5,7 @@ import { CREATE_EVENT } from '@/analytics/graphql/queries/createEvent';
|
||||
import { GET_CLIENT_CONFIG } from '@/client-config/graphql/queries/getClientConfig';
|
||||
import { FIND_MANY_METADATA_OBJECTS } from '@/object-metadata/graphql/queries';
|
||||
import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser';
|
||||
import { mockedActivities } from '~/testing/mock-data/activities';
|
||||
|
||||
import { mockedCompaniesData } from './mock-data/companies';
|
||||
import { mockedObjectMetadataItems } from './mock-data/metadata';
|
||||
@ -17,128 +18,151 @@ const metadataGraphql = graphql.link(
|
||||
`${process.env.REACT_APP_SERVER_BASE_URL}/metadata`,
|
||||
);
|
||||
|
||||
export const graphqlMocks = [
|
||||
graphql.query(getOperationName(GET_CURRENT_USER) ?? '', (req, res, ctx) => {
|
||||
return res(
|
||||
ctx.data({
|
||||
currentUser: mockedUsersData[0],
|
||||
}),
|
||||
);
|
||||
}),
|
||||
graphql.mutation(getOperationName(CREATE_EVENT) ?? '', (req, res, ctx) => {
|
||||
return res(
|
||||
ctx.data({
|
||||
createEvent: { success: 1, __typename: 'Event' },
|
||||
}),
|
||||
);
|
||||
}),
|
||||
graphql.query(getOperationName(GET_CLIENT_CONFIG) ?? '', (req, res, ctx) => {
|
||||
return res(
|
||||
ctx.data({
|
||||
clientConfig: {
|
||||
signInPrefilled: true,
|
||||
dataModelSettingsEnabled: true,
|
||||
developersSettingsEnabled: true,
|
||||
debugMode: false,
|
||||
authProviders: { google: true, password: true, magicLink: false },
|
||||
telemetry: { enabled: false, anonymizationEnabled: true },
|
||||
support: {
|
||||
supportDriver: 'front',
|
||||
supportFrontChatId: null,
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
}),
|
||||
metadataGraphql.query(
|
||||
getOperationName(FIND_MANY_METADATA_OBJECTS) ?? '',
|
||||
(req, res, ctx) => {
|
||||
return res(ctx.data({ objects: mockedObjectMetadataItems }));
|
||||
},
|
||||
),
|
||||
graphql.query('FindManyViews', (req, res, ctx) => {
|
||||
const objectMetadataId = req.variables.filter.objectMetadataId.eq;
|
||||
const viewType = req.variables.filter.type.eq;
|
||||
export const graphqlMocks = {
|
||||
handlers: [
|
||||
graphql.query(getOperationName(GET_CURRENT_USER) ?? '', (req, res, ctx) => {
|
||||
return res(
|
||||
ctx.data({
|
||||
currentUser: mockedUsersData[0],
|
||||
}),
|
||||
);
|
||||
}),
|
||||
graphql.mutation(getOperationName(CREATE_EVENT) ?? '', (req, res, ctx) => {
|
||||
return res(
|
||||
ctx.data({
|
||||
createEvent: { success: 1, __typename: 'Event' },
|
||||
}),
|
||||
);
|
||||
}),
|
||||
graphql.query(
|
||||
getOperationName(GET_CLIENT_CONFIG) ?? '',
|
||||
(req, res, ctx) => {
|
||||
return res(
|
||||
ctx.data({
|
||||
clientConfig: {
|
||||
signInPrefilled: true,
|
||||
dataModelSettingsEnabled: true,
|
||||
developersSettingsEnabled: true,
|
||||
debugMode: false,
|
||||
authProviders: { google: true, password: true, magicLink: false },
|
||||
telemetry: { enabled: false, anonymizationEnabled: true },
|
||||
support: {
|
||||
supportDriver: 'front',
|
||||
supportFrontChatId: null,
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
},
|
||||
),
|
||||
metadataGraphql.query(
|
||||
getOperationName(FIND_MANY_METADATA_OBJECTS) ?? '',
|
||||
(req, res, ctx) => {
|
||||
return res(ctx.data({ objects: mockedObjectMetadataItems }));
|
||||
},
|
||||
),
|
||||
graphql.query('FindManyViews', (req, res, ctx) => {
|
||||
const objectMetadataId = req.variables.filter.objectMetadataId.eq;
|
||||
const viewType = req.variables.filter.type.eq;
|
||||
|
||||
return res(
|
||||
ctx.data({
|
||||
views: {
|
||||
edges: mockedViewsData
|
||||
.filter(
|
||||
(view) =>
|
||||
view.objectMetadataId === objectMetadataId &&
|
||||
view.type === viewType,
|
||||
)
|
||||
.map((view) => ({
|
||||
node: view,
|
||||
return res(
|
||||
ctx.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('FindManyViewFields', (req, res, ctx) => {
|
||||
const viewId = req.variables.filter.view.eq;
|
||||
|
||||
return res(
|
||||
ctx.data({
|
||||
viewFields: {
|
||||
edges: mockedViewFieldsData
|
||||
.filter((viewField) => viewField.viewId === viewId)
|
||||
.map((viewField) => ({
|
||||
node: viewField,
|
||||
cursor: null,
|
||||
})),
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
}),
|
||||
graphql.query('FindManyCompanies', (req, res, ctx) => {
|
||||
return res(
|
||||
ctx.data({
|
||||
companies: {
|
||||
edges: mockedCompaniesData.map((company) => ({
|
||||
node: company,
|
||||
cursor: null,
|
||||
})),
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
}),
|
||||
graphql.query('FindManyViewFields', (req, res, ctx) => {
|
||||
const viewId = req.variables.filter.view.eq;
|
||||
|
||||
return res(
|
||||
ctx.data({
|
||||
viewFields: {
|
||||
edges: mockedViewFieldsData
|
||||
.filter((viewField) => viewField.viewId === viewId)
|
||||
.map((viewField) => ({
|
||||
node: viewField,
|
||||
}),
|
||||
);
|
||||
}),
|
||||
graphql.query('FindManyPeople', (req, res, ctx) => {
|
||||
return res(
|
||||
ctx.data({
|
||||
people: {
|
||||
edges: mockedPeopleData.map((person) => ({
|
||||
node: person,
|
||||
cursor: null,
|
||||
})),
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
}),
|
||||
graphql.query('FindManyCompanies', (req, res, ctx) => {
|
||||
return res(
|
||||
ctx.data({
|
||||
companies: {
|
||||
edges: mockedCompaniesData.map((company) => ({
|
||||
node: company,
|
||||
cursor: null,
|
||||
})),
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
}),
|
||||
);
|
||||
}),
|
||||
graphql.query('FindManyActivities', (req, res, ctx) => {
|
||||
return res(
|
||||
ctx.data({
|
||||
activities: {
|
||||
edges: mockedActivities.map((activities) => ({
|
||||
node: activities,
|
||||
cursor: null,
|
||||
})),
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
}),
|
||||
graphql.query('FindManyPeople', (req, res, ctx) => {
|
||||
return res(
|
||||
ctx.data({
|
||||
people: {
|
||||
edges: mockedPeopleData.map((person) => ({
|
||||
node: person,
|
||||
cursor: null,
|
||||
})),
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
}),
|
||||
];
|
||||
}),
|
||||
);
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
@ -5,34 +5,245 @@ import {
|
||||
|
||||
export const mockedPeopleMetadata = {
|
||||
node: {
|
||||
id: 'e3802178-cfe8-4df1-8be6-b1b26ba10a21',
|
||||
dataSourceId: '',
|
||||
__typename: 'object',
|
||||
id: '20202020-c64b-44bc-bd2c-502c99f49dca',
|
||||
nameSingular: 'person',
|
||||
namePlural: 'people',
|
||||
labelSingular: 'Person',
|
||||
labelPlural: 'People',
|
||||
description: null,
|
||||
description: 'A person',
|
||||
icon: 'IconUser',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
createdAt: '',
|
||||
updatedAt: '',
|
||||
isSystem: false,
|
||||
createdAt: '2023-11-24T03:29:18.207Z',
|
||||
updatedAt: '2023-11-24T03:29:18.207Z',
|
||||
fields: {
|
||||
edges: [
|
||||
{
|
||||
node: {
|
||||
id: '86b696ea-9b43-46b4-9162-e1ee8b558a38',
|
||||
type: FieldMetadataType.Text,
|
||||
__typename: 'field',
|
||||
id: '20202020-2bf4-42b8-8718-a3e852bfa6a6',
|
||||
type: 'DATE_TIME',
|
||||
name: 'updatedAt',
|
||||
label: 'Update date',
|
||||
description: null,
|
||||
icon: 'IconCalendar',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
createdAt: '2023-11-24T03:29:18.268Z',
|
||||
updatedAt: '2023-11-24T03:29:18.268Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-03cd-4cd0-9afc-92077b69f24f',
|
||||
type: 'UUID',
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
description: null,
|
||||
icon: null,
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
createdAt: '2023-11-24T03:29:18.268Z',
|
||||
updatedAt: '2023-11-24T03:29:18.268Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-486f-45f9-bbdf-aac18b1831c0',
|
||||
type: 'TEXT',
|
||||
name: 'phone',
|
||||
label: 'Phone',
|
||||
description: 'Contact’s phone number',
|
||||
icon: 'IconPhone',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.268Z',
|
||||
updatedAt: '2023-11-24T03:29:18.268Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-dcf6-445a-b543-37e55de43c25',
|
||||
type: 'LINK',
|
||||
name: 'linkedinLink',
|
||||
label: 'Linkedin',
|
||||
description: 'Contact’s Linkedin account',
|
||||
icon: 'IconBrandLinkedin',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.268Z',
|
||||
updatedAt: '2023-11-24T03:29:18.268Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-64e1-4080-b6ad-db03c3809f8b',
|
||||
type: 'UUID',
|
||||
name: 'companyId',
|
||||
label: 'Company ID (foreign key)',
|
||||
description: 'Foreign key for company',
|
||||
icon: null,
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.268Z',
|
||||
updatedAt: '2023-11-24T03:29:18.268Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-bb05-45cb-aa2a-71b58d49dd23',
|
||||
type: 'TEXT',
|
||||
name: 'avatarUrl',
|
||||
label: 'Avatar',
|
||||
description: 'Contact’s avatar',
|
||||
icon: 'IconFileUpload',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.268Z',
|
||||
updatedAt: '2023-11-24T03:29:18.268Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-a3a7-4f63-9303-10226f6055be',
|
||||
type: 'LINK',
|
||||
name: 'xLink',
|
||||
label: 'X',
|
||||
description: 'Contact’s X/Twitter account',
|
||||
icon: 'IconBrandX',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.268Z',
|
||||
updatedAt: '2023-11-24T03:29:18.268Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-3b86-413e-ab56-0ebd1a583ff3',
|
||||
type: 'TEXT',
|
||||
name: 'jobTitle',
|
||||
label: 'Job Title',
|
||||
description: 'Contact’s job title',
|
||||
icon: 'IconBriefcase',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.268Z',
|
||||
updatedAt: '2023-11-24T03:29:18.268Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-8a96-4e4b-86fd-ea126530e0c1',
|
||||
type: 'EMAIL',
|
||||
name: 'email',
|
||||
label: 'Email',
|
||||
description: 'Contact’s Email',
|
||||
icon: 'IconMail',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.268Z',
|
||||
updatedAt: '2023-11-24T03:29:18.268Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-9b56-4888-bfe3-f6f59aa999e3',
|
||||
type: 'FULL_NAME',
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
description: '',
|
||||
placeholder: null,
|
||||
description: 'Contact’s name',
|
||||
icon: 'IconUser',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.268Z',
|
||||
updatedAt: '2023-11-24T03:29:18.268Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-78f8-4b4c-90ff-86adf77590f5',
|
||||
type: 'TEXT',
|
||||
name: 'city',
|
||||
label: 'City',
|
||||
description: 'Contact’s city',
|
||||
icon: 'IconMap',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.268Z',
|
||||
updatedAt: '2023-11-24T03:29:18.268Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-bec0-4cf0-bf1c-8b2ed21f027a',
|
||||
type: 'DATE_TIME',
|
||||
name: 'createdAt',
|
||||
label: 'Creation date',
|
||||
description: null,
|
||||
icon: 'IconCalendar',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
createdAt: '',
|
||||
updatedAt: '',
|
||||
createdAt: '2023-11-24T03:29:18.268Z',
|
||||
updatedAt: '2023-11-24T03:29:18.268Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
@ -72,7 +283,7 @@ export const mockedPeopleMetadata = {
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
},
|
||||
totalCount: 2,
|
||||
totalCount: 12,
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -149,7 +360,6 @@ export const mockedCompaniesMetadata = {
|
||||
relationType: RelationMetadataType.OneToMany,
|
||||
toObjectMetadata: {
|
||||
id: mockedPeopleMetadata.node.id,
|
||||
dataSourceId: mockedPeopleMetadata.node.dataSourceId,
|
||||
nameSingular: mockedPeopleMetadata.node.nameSingular,
|
||||
namePlural: mockedPeopleMetadata.node.namePlural,
|
||||
},
|
||||
@ -306,6 +516,244 @@ export const mockedWorkspacesMetadata = {
|
||||
},
|
||||
};
|
||||
|
||||
export const mockedActivitiesMetadata = {
|
||||
node: {
|
||||
__typename: 'object',
|
||||
id: '20202020-8ee3-4f67-84ab-1b7a6eb5a448',
|
||||
nameSingular: 'activity',
|
||||
namePlural: 'activities',
|
||||
labelSingular: 'Activity',
|
||||
labelPlural: 'Activities',
|
||||
description: 'An activity',
|
||||
icon: 'IconCheckbox',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
createdAt: '2023-11-24T03:29:18.207Z',
|
||||
updatedAt: '2023-11-24T03:29:18.207Z',
|
||||
fields: {
|
||||
edges: [
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-4694-4ec6-9084-8d932ebb3066',
|
||||
type: 'UUID',
|
||||
name: 'assigneeId',
|
||||
label: 'Assignee id (foreign key)',
|
||||
description: 'Acitivity assignee id foreign key',
|
||||
icon: null,
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.228Z',
|
||||
updatedAt: '2023-11-24T03:29:18.228Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-88df-4202-bf82-6a06c6963280',
|
||||
type: 'DATE_TIME',
|
||||
name: 'updatedAt',
|
||||
label: 'Update date',
|
||||
description: null,
|
||||
icon: 'IconCalendar',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
createdAt: '2023-11-24T03:29:18.228Z',
|
||||
updatedAt: '2023-11-24T03:29:18.228Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-aff0-4961-be8a-0e5c2598b9a6',
|
||||
type: 'TEXT',
|
||||
name: 'body',
|
||||
label: 'Body',
|
||||
description: 'Activity body',
|
||||
icon: 'IconList',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.228Z',
|
||||
updatedAt: '2023-11-24T03:29:18.228Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-cd46-44f4-bf22-b0aa20d009da',
|
||||
type: 'DATE_TIME',
|
||||
name: 'reminderAt',
|
||||
label: 'Reminder Date',
|
||||
description: 'Activity reminder date',
|
||||
icon: 'IconCalendarEvent',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.228Z',
|
||||
updatedAt: '2023-11-24T03:29:18.228Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-2584-4797-95a8-5cc90d48c040',
|
||||
type: 'TEXT',
|
||||
name: 'title',
|
||||
label: 'Title',
|
||||
description: 'Activity title',
|
||||
icon: 'IconNotes',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.228Z',
|
||||
updatedAt: '2023-11-24T03:29:18.228Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-f695-419c-b928-c488323d6df3',
|
||||
type: 'UUID',
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
description: null,
|
||||
icon: null,
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
createdAt: '2023-11-24T03:29:18.228Z',
|
||||
updatedAt: '2023-11-24T03:29:18.228Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-3acb-46bb-b993-0dc49fa2a48d',
|
||||
type: 'UUID',
|
||||
name: 'authorId',
|
||||
label: 'Author id (foreign key)',
|
||||
description: 'Activity author id foreign key',
|
||||
icon: null,
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
createdAt: '2023-11-24T03:29:18.228Z',
|
||||
updatedAt: '2023-11-24T03:29:18.228Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-0924-48f0-a8c2-d2dd4e2098e2',
|
||||
type: 'DATE_TIME',
|
||||
name: 'completedAt',
|
||||
label: 'Completion Date',
|
||||
description: 'Activity completion date',
|
||||
icon: 'IconCheck',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.228Z',
|
||||
updatedAt: '2023-11-24T03:29:18.228Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-a243-4b94-a4b4-25705af86be2',
|
||||
type: 'TEXT',
|
||||
name: 'type',
|
||||
label: 'Type',
|
||||
description: 'Activity type',
|
||||
icon: 'IconCheckbox',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
createdAt: '2023-11-24T03:29:18.228Z',
|
||||
updatedAt: '2023-11-24T03:29:18.228Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-65a2-4d9c-b640-bac54007a14d',
|
||||
type: 'DATE_TIME',
|
||||
name: 'createdAt',
|
||||
label: 'Creation date',
|
||||
description: null,
|
||||
icon: 'IconCalendar',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
createdAt: '2023-11-24T03:29:18.228Z',
|
||||
updatedAt: '2023-11-24T03:29:18.228Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: '20202020-20e1-4366-b386-750bdca2dfe3',
|
||||
type: 'DATE_TIME',
|
||||
name: 'dueAt',
|
||||
label: 'Due Date',
|
||||
description: 'Activity due date',
|
||||
icon: 'IconCalendarEvent',
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
createdAt: '2023-11-24T03:29:18.228Z',
|
||||
updatedAt: '2023-11-24T03:29:18.228Z',
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
],
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
},
|
||||
totalCount: 11,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const mockedObjectMetadataItems = {
|
||||
edges: [
|
||||
{
|
||||
@ -509,6 +957,8 @@ export const mockedObjectMetadataItems = {
|
||||
mockedPeopleMetadata,
|
||||
mockedCompaniesMetadata,
|
||||
mockedWorkspacesMetadata,
|
||||
mockedPeopleMetadata,
|
||||
mockedActivitiesMetadata,
|
||||
],
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
@ -516,5 +966,5 @@ export const mockedObjectMetadataItems = {
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
},
|
||||
totalCount: 5,
|
||||
totalCount: 6,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user