mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-26 13:31:45 +03:00
Fix tests
This commit is contained in:
parent
6683ffb890
commit
a8908b6296
@ -3155,6 +3155,14 @@ export const getObjectMetadataItemsMock = () => {
|
|||||||
},
|
},
|
||||||
toFieldMetadataId: '20202020-64e1-4080-b6ad-db03c3809885',
|
toFieldMetadataId: '20202020-64e1-4080-b6ad-db03c3809885',
|
||||||
},
|
},
|
||||||
|
relationDefinition: {
|
||||||
|
targetObjectMetadata: {
|
||||||
|
nameSingular: 'person',
|
||||||
|
},
|
||||||
|
targetFieldMetadata: {
|
||||||
|
name: 'company',
|
||||||
|
},
|
||||||
|
},
|
||||||
toRelationMetadata: null,
|
toRelationMetadata: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -112,7 +112,9 @@ export const RelationFromManyFieldInputMultiRecordsEffect = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setObjectRecordMultiSelectCheckedRecordsIds(
|
setObjectRecordMultiSelectCheckedRecordsIds(
|
||||||
fieldValue.map((fieldValueItem: EntityForSelect) => fieldValueItem.id),
|
fieldValue
|
||||||
|
? fieldValue.map((fieldValueItem: EntityForSelect) => fieldValueItem.id)
|
||||||
|
: [],
|
||||||
);
|
);
|
||||||
}, [fieldValue, setObjectRecordMultiSelectCheckedRecordsIds]);
|
}, [fieldValue, setObjectRecordMultiSelectCheckedRecordsIds]);
|
||||||
|
|
||||||
|
@ -45,15 +45,14 @@ const RelationManyFieldInputWithContext = () => {
|
|||||||
<FieldContextProvider
|
<FieldContextProvider
|
||||||
fieldDefinition={{
|
fieldDefinition={{
|
||||||
fieldMetadataId: 'relation',
|
fieldMetadataId: 'relation',
|
||||||
label: 'Relation',
|
label: 'People',
|
||||||
type: FieldMetadataType.Relation,
|
type: FieldMetadataType.Relation,
|
||||||
iconName: 'IconLink',
|
iconName: 'IconLink',
|
||||||
metadata: {
|
metadata: {
|
||||||
fieldName: 'Relation',
|
fieldName: 'people',
|
||||||
relationObjectMetadataNamePlural: 'workspaceMembers',
|
relationObjectMetadataNamePlural: 'companies',
|
||||||
relationObjectMetadataNameSingular:
|
relationObjectMetadataNameSingular: CoreObjectNameSingular.Company,
|
||||||
CoreObjectNameSingular.WorkspaceMember,
|
objectMetadataNameSingular: 'company',
|
||||||
objectMetadataNameSingular: 'person',
|
|
||||||
relationFieldMetadataId: '20202020-8c37-4163-ba06-1dada334ce3e',
|
relationFieldMetadataId: '20202020-8c37-4163-ba06-1dada334ce3e',
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
@ -59,6 +59,11 @@ export const companiesQueryResult = {
|
|||||||
url: '',
|
url: '',
|
||||||
},
|
},
|
||||||
previousEmployees: {
|
previousEmployees: {
|
||||||
|
annualRecurringRevenue: {
|
||||||
|
__typename: 'Currency',
|
||||||
|
amountMicros: null,
|
||||||
|
currencyCode: '',
|
||||||
|
},
|
||||||
__typename: 'Person',
|
__typename: 'Person',
|
||||||
id: '20202020-2d40-4e49-8df4-9c6a049191de',
|
id: '20202020-2d40-4e49-8df4-9c6a049191de',
|
||||||
email: 'louis.duss@google.com',
|
email: 'louis.duss@google.com',
|
||||||
@ -138,6 +143,11 @@ export const companiesQueryResult = {
|
|||||||
domainName: 'facebook.com',
|
domainName: 'facebook.com',
|
||||||
address: '',
|
address: '',
|
||||||
previousEmployees: null,
|
previousEmployees: null,
|
||||||
|
annualRecurringRevenue: {
|
||||||
|
__typename: 'Currency',
|
||||||
|
amountMicros: null,
|
||||||
|
currencyCode: '',
|
||||||
|
},
|
||||||
position: 2,
|
position: 2,
|
||||||
linkedinLink: {
|
linkedinLink: {
|
||||||
__typename: 'Link',
|
__typename: 'Link',
|
||||||
@ -160,6 +170,11 @@ export const companiesQueryResult = {
|
|||||||
domainName: 'qonto.com',
|
domainName: 'qonto.com',
|
||||||
address: '',
|
address: '',
|
||||||
previousEmployees: null,
|
previousEmployees: null,
|
||||||
|
annualRecurringRevenue: {
|
||||||
|
__typename: 'Currency',
|
||||||
|
amountMicros: null,
|
||||||
|
currencyCode: '',
|
||||||
|
},
|
||||||
position: 3,
|
position: 3,
|
||||||
linkedinLink: {
|
linkedinLink: {
|
||||||
__typename: 'Link',
|
__typename: 'Link',
|
||||||
@ -182,6 +197,11 @@ export const companiesQueryResult = {
|
|||||||
domainName: 'microsoft.com',
|
domainName: 'microsoft.com',
|
||||||
address: '',
|
address: '',
|
||||||
previousEmployees: null,
|
previousEmployees: null,
|
||||||
|
annualRecurringRevenue: {
|
||||||
|
__typename: 'Currency',
|
||||||
|
amountMicros: null,
|
||||||
|
currencyCode: '',
|
||||||
|
},
|
||||||
position: 4,
|
position: 4,
|
||||||
linkedinLink: {
|
linkedinLink: {
|
||||||
__typename: 'Link',
|
__typename: 'Link',
|
||||||
@ -204,6 +224,11 @@ export const companiesQueryResult = {
|
|||||||
domainName: 'airbnb.com',
|
domainName: 'airbnb.com',
|
||||||
address: '',
|
address: '',
|
||||||
previousEmployees: null,
|
previousEmployees: null,
|
||||||
|
annualRecurringRevenue: {
|
||||||
|
__typename: 'Currency',
|
||||||
|
amountMicros: null,
|
||||||
|
currencyCode: '',
|
||||||
|
},
|
||||||
position: 5,
|
position: 5,
|
||||||
linkedinLink: {
|
linkedinLink: {
|
||||||
__typename: 'Link',
|
__typename: 'Link',
|
||||||
@ -226,6 +251,11 @@ export const companiesQueryResult = {
|
|||||||
domainName: 'google.com',
|
domainName: 'google.com',
|
||||||
address: '',
|
address: '',
|
||||||
previousEmployees: null,
|
previousEmployees: null,
|
||||||
|
annualRecurringRevenue: {
|
||||||
|
__typename: 'Currency',
|
||||||
|
amountMicros: null,
|
||||||
|
currencyCode: '',
|
||||||
|
},
|
||||||
position: 6,
|
position: 6,
|
||||||
linkedinLink: {
|
linkedinLink: {
|
||||||
__typename: 'Link',
|
__typename: 'Link',
|
||||||
@ -248,6 +278,11 @@ export const companiesQueryResult = {
|
|||||||
domainName: 'netflix.com',
|
domainName: 'netflix.com',
|
||||||
address: '',
|
address: '',
|
||||||
previousEmployees: null,
|
previousEmployees: null,
|
||||||
|
annualRecurringRevenue: {
|
||||||
|
__typename: 'Currency',
|
||||||
|
amountMicros: null,
|
||||||
|
currencyCode: '',
|
||||||
|
},
|
||||||
position: 7,
|
position: 7,
|
||||||
linkedinLink: {
|
linkedinLink: {
|
||||||
__typename: 'Link',
|
__typename: 'Link',
|
||||||
@ -270,6 +305,11 @@ export const companiesQueryResult = {
|
|||||||
domainName: 'libeo.io',
|
domainName: 'libeo.io',
|
||||||
address: '',
|
address: '',
|
||||||
previousEmployees: null,
|
previousEmployees: null,
|
||||||
|
annualRecurringRevenue: {
|
||||||
|
__typename: 'Currency',
|
||||||
|
amountMicros: null,
|
||||||
|
currencyCode: '',
|
||||||
|
},
|
||||||
position: 8,
|
position: 8,
|
||||||
linkedinLink: {
|
linkedinLink: {
|
||||||
__typename: 'Link',
|
__typename: 'Link',
|
||||||
@ -292,6 +332,11 @@ export const companiesQueryResult = {
|
|||||||
domainName: 'claap.io',
|
domainName: 'claap.io',
|
||||||
address: '',
|
address: '',
|
||||||
previousEmployees: null,
|
previousEmployees: null,
|
||||||
|
annualRecurringRevenue: {
|
||||||
|
__typename: 'Currency',
|
||||||
|
amountMicros: null,
|
||||||
|
currencyCode: '',
|
||||||
|
},
|
||||||
position: 9,
|
position: 9,
|
||||||
linkedinLink: {
|
linkedinLink: {
|
||||||
__typename: 'Link',
|
__typename: 'Link',
|
||||||
@ -314,6 +359,11 @@ export const companiesQueryResult = {
|
|||||||
domainName: 'hasura.io',
|
domainName: 'hasura.io',
|
||||||
address: '',
|
address: '',
|
||||||
previousEmployees: null,
|
previousEmployees: null,
|
||||||
|
annualRecurringRevenue: {
|
||||||
|
__typename: 'Currency',
|
||||||
|
amountMicros: null,
|
||||||
|
currencyCode: '',
|
||||||
|
},
|
||||||
position: 10,
|
position: 10,
|
||||||
linkedinLink: {
|
linkedinLink: {
|
||||||
__typename: 'Link',
|
__typename: 'Link',
|
||||||
@ -336,6 +386,11 @@ export const companiesQueryResult = {
|
|||||||
domainName: 'wework.com',
|
domainName: 'wework.com',
|
||||||
address: '',
|
address: '',
|
||||||
previousEmployees: null,
|
previousEmployees: null,
|
||||||
|
annualRecurringRevenue: {
|
||||||
|
__typename: 'Currency',
|
||||||
|
amountMicros: null,
|
||||||
|
currencyCode: '',
|
||||||
|
},
|
||||||
position: 11,
|
position: 11,
|
||||||
linkedinLink: {
|
linkedinLink: {
|
||||||
__typename: 'Link',
|
__typename: 'Link',
|
||||||
@ -358,6 +413,11 @@ export const companiesQueryResult = {
|
|||||||
domainName: 'samsung.com',
|
domainName: 'samsung.com',
|
||||||
address: '',
|
address: '',
|
||||||
previousEmployees: null,
|
previousEmployees: null,
|
||||||
|
annualRecurringRevenue: {
|
||||||
|
__typename: 'Currency',
|
||||||
|
amountMicros: null,
|
||||||
|
currencyCode: '',
|
||||||
|
},
|
||||||
position: 12,
|
position: 12,
|
||||||
linkedinLink: {
|
linkedinLink: {
|
||||||
__typename: 'Link',
|
__typename: 'Link',
|
||||||
@ -380,6 +440,11 @@ export const companiesQueryResult = {
|
|||||||
domainName: 'algolia.com',
|
domainName: 'algolia.com',
|
||||||
address: '',
|
address: '',
|
||||||
previousEmployees: null,
|
previousEmployees: null,
|
||||||
|
annualRecurringRevenue: {
|
||||||
|
__typename: 'Currency',
|
||||||
|
amountMicros: null,
|
||||||
|
currencyCode: '',
|
||||||
|
},
|
||||||
position: 13,
|
position: 13,
|
||||||
linkedinLink: {
|
linkedinLink: {
|
||||||
__typename: 'Link',
|
__typename: 'Link',
|
||||||
|
Loading…
Reference in New Issue
Block a user