mirror of
https://github.com/lingble/twenty.git
synced 2025-11-01 21:27:58 +00:00
@@ -62,7 +62,7 @@ describe('custom auth', () => {
|
|||||||
expect(response.data).toHaveProperty('currentWorkspace');
|
expect(response.data).toHaveProperty('currentWorkspace');
|
||||||
expect(response.data.currentWorkspace).toHaveProperty('displayName');
|
expect(response.data.currentWorkspace).toHaveProperty('displayName');
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
expect(error.message).toContain('ENOTFOUND');
|
expect(error.message).toBeDefined();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,18 @@ describe('creates.create_company', () => {
|
|||||||
crudZapierOperation: Operation.create,
|
crudZapierOperation: Operation.create,
|
||||||
name: 'Company Name',
|
name: 'Company Name',
|
||||||
address: { addressCity: 'Paris' },
|
address: { addressCity: 'Paris' },
|
||||||
domainName: 'Company Domain Name',
|
linkedinLink: {
|
||||||
linkedinLink: { url: '/linkedin_url', label: 'Test linkedinUrl' },
|
primaryLinkUrl: '/linkedin_url',
|
||||||
xLink: { url: '/x_url', label: 'Test xUrl' },
|
primaryLinkLabel: 'Test linkedinUrl',
|
||||||
|
secondaryLinks: [
|
||||||
|
'{ url: "/linkedin_url2", label: "Test linkedinUrl2" }',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
xLink: {
|
||||||
|
primaryLinkUrl: '/x_url',
|
||||||
|
primaryLinkLabel: 'Test xUrl',
|
||||||
|
secondaryLinks: ['{ url: "/x_url2", label: "Test xUrl2" }'],
|
||||||
|
},
|
||||||
annualRecurringRevenue: {
|
annualRecurringRevenue: {
|
||||||
amountMicros: 100000000000,
|
amountMicros: 100000000000,
|
||||||
currencyCode: 'USD',
|
currencyCode: 'USD',
|
||||||
@@ -49,8 +58,11 @@ describe('creates.create_company', () => {
|
|||||||
nameSingular: 'Person',
|
nameSingular: 'Person',
|
||||||
crudZapierOperation: Operation.create,
|
crudZapierOperation: Operation.create,
|
||||||
name: { firstName: 'John', lastName: 'Doe' },
|
name: { firstName: 'John', lastName: 'Doe' },
|
||||||
email: 'johndoe@gmail.com',
|
phones: {
|
||||||
phone: '+33610203040',
|
primaryPhoneNumber: '610203040',
|
||||||
|
primaryPhoneCountryCode: '+33',
|
||||||
|
additionalPhones: ['{number: "610203041", countryCode: "+33"}'],
|
||||||
|
},
|
||||||
city: 'Paris',
|
city: 'Paris',
|
||||||
});
|
});
|
||||||
const result = await appTester(
|
const result = await appTester(
|
||||||
@@ -64,11 +76,13 @@ describe('creates.create_company', () => {
|
|||||||
requestDb(
|
requestDb(
|
||||||
z,
|
z,
|
||||||
bundle,
|
bundle,
|
||||||
`query findPerson {person(filter: {id: {eq: "${result.data.createPerson.id}"}}){phone}}`,
|
`query findPerson {person(filter: {id: {eq: "${result.data.createPerson.id}"}}){phones{primaryPhoneNumber}}}`,
|
||||||
),
|
),
|
||||||
bundle,
|
bundle,
|
||||||
);
|
);
|
||||||
expect(checkDbResult.data.person.phone).toEqual('+33610203040');
|
expect(checkDbResult.data.person.phones.primaryPhoneNumber).toEqual(
|
||||||
|
'610203040',
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,8 @@ describe('computeInputFields', () => {
|
|||||||
helpText:
|
helpText:
|
||||||
'Annual Salary of the Person: Amount Micros. eg: set 3210000 for 3.21$',
|
'Annual Salary of the Person: Amount Micros. eg: set 3210000 for 3.21$',
|
||||||
required: false,
|
required: false,
|
||||||
|
list: false,
|
||||||
|
placeholder: undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'annualSalary__currencyCode',
|
key: 'annualSalary__currencyCode',
|
||||||
@@ -150,6 +152,8 @@ describe('computeInputFields', () => {
|
|||||||
helpText:
|
helpText:
|
||||||
'Annual Salary of the Person: Currency Code. eg: USD, EUR, etc...',
|
'Annual Salary of the Person: Currency Code. eg: USD, EUR, etc...',
|
||||||
required: false,
|
required: false,
|
||||||
|
list: false,
|
||||||
|
placeholder: undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'jobTitle',
|
key: 'jobTitle',
|
||||||
@@ -157,6 +161,8 @@ describe('computeInputFields', () => {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
helpText: 'Contact’s job title',
|
helpText: 'Contact’s job title',
|
||||||
required: false,
|
required: false,
|
||||||
|
list: false,
|
||||||
|
placeholder: undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'updatedAt',
|
key: 'updatedAt',
|
||||||
@@ -164,6 +170,8 @@ describe('computeInputFields', () => {
|
|||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
helpText: null,
|
helpText: null,
|
||||||
required: false,
|
required: false,
|
||||||
|
list: false,
|
||||||
|
placeholder: undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'name__firstName',
|
key: 'name__firstName',
|
||||||
@@ -171,6 +179,8 @@ describe('computeInputFields', () => {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
helpText: 'Contact’s name: First Name',
|
helpText: 'Contact’s name: First Name',
|
||||||
required: false,
|
required: false,
|
||||||
|
list: false,
|
||||||
|
placeholder: undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'name__lastName',
|
key: 'name__lastName',
|
||||||
@@ -178,6 +188,8 @@ describe('computeInputFields', () => {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
helpText: 'Contact’s name: Last Name',
|
helpText: 'Contact’s name: Last Name',
|
||||||
required: false,
|
required: false,
|
||||||
|
list: false,
|
||||||
|
placeholder: undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'recordPosition',
|
key: 'recordPosition',
|
||||||
@@ -185,6 +197,8 @@ describe('computeInputFields', () => {
|
|||||||
type: 'integer',
|
type: 'integer',
|
||||||
helpText: 'Record Position',
|
helpText: 'Record Position',
|
||||||
required: false,
|
required: false,
|
||||||
|
list: false,
|
||||||
|
placeholder: undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'xLink__url',
|
key: 'xLink__url',
|
||||||
@@ -192,6 +206,8 @@ describe('computeInputFields', () => {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
helpText: 'Contact’s X/Twitter account: Link Url',
|
helpText: 'Contact’s X/Twitter account: Link Url',
|
||||||
required: false,
|
required: false,
|
||||||
|
list: false,
|
||||||
|
placeholder: undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'xLink__label',
|
key: 'xLink__label',
|
||||||
@@ -199,27 +215,35 @@ describe('computeInputFields', () => {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
helpText: 'Contact’s X/Twitter account: Link Label',
|
helpText: 'Contact’s X/Twitter account: Link Label',
|
||||||
required: false,
|
required: false,
|
||||||
|
list: false,
|
||||||
|
placeholder: undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'whatsapp__url',
|
key: 'whatsapp__primaryLinkLabel',
|
||||||
label: 'Whatsapp: Url',
|
label: 'Whatsapp: Primary Link Label',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
helpText: 'Contact’s Whatsapp account: Link Url',
|
helpText: 'Contact’s Whatsapp account: Primary Link Label',
|
||||||
required: false,
|
required: false,
|
||||||
|
list: false,
|
||||||
|
placeholder: undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'whatsapp__label',
|
key: 'whatsapp__primaryLinkUrl',
|
||||||
label: 'Whatsapp: Label',
|
label: 'Whatsapp: Primary Link Url',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
helpText: 'Contact’s Whatsapp account: Link Label',
|
helpText: 'Contact’s Whatsapp account: Primary Link Url',
|
||||||
required: false,
|
required: false,
|
||||||
|
list: false,
|
||||||
|
placeholder: undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'whatsapp__secondaryLinks',
|
key: 'whatsapp__secondaryLinks',
|
||||||
label: 'Whatsapp: Secondary Lings',
|
label: 'Whatsapp: Secondary Links',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
helpText: 'Contact’s Whatsapp account: Link Label',
|
helpText: 'Contact’s Whatsapp account: Secondary Links',
|
||||||
required: false,
|
required: false,
|
||||||
|
list: true,
|
||||||
|
placeholder: '{ url: "", label: "" }',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'email',
|
key: 'email',
|
||||||
@@ -227,6 +251,8 @@ describe('computeInputFields', () => {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
helpText: 'Contact’s Email',
|
helpText: 'Contact’s Email',
|
||||||
required: false,
|
required: false,
|
||||||
|
list: false,
|
||||||
|
placeholder: undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'companyId',
|
key: 'companyId',
|
||||||
@@ -234,6 +260,8 @@ describe('computeInputFields', () => {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
helpText: 'Contact’s company id foreign key',
|
helpText: 'Contact’s company id foreign key',
|
||||||
required: false,
|
required: false,
|
||||||
|
list: false,
|
||||||
|
placeholder: undefined,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const idInputField: InputField = {
|
const idInputField: InputField = {
|
||||||
@@ -241,6 +269,8 @@ describe('computeInputFields', () => {
|
|||||||
label: 'Id',
|
label: 'Id',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
helpText: null,
|
helpText: null,
|
||||||
|
list: false,
|
||||||
|
placeholder: undefined,
|
||||||
required: false,
|
required: false,
|
||||||
};
|
};
|
||||||
const expectedResult = [idInputField].concat(baseExpectedResult);
|
const expectedResult = [idInputField].concat(baseExpectedResult);
|
||||||
|
|||||||
@@ -290,6 +290,7 @@ export const computeInputFields = (
|
|||||||
helpText: nodeField.description,
|
helpText: nodeField.description,
|
||||||
required,
|
required,
|
||||||
list: getListFromFieldMetadataType(nodeField.type),
|
list: getListFromFieldMetadataType(nodeField.type),
|
||||||
|
placeholder: undefined,
|
||||||
};
|
};
|
||||||
result.push(field);
|
result.push(field);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -11,10 +11,6 @@
|
|||||||
"skipLibCheck": true
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.spec.tsx",
|
|
||||||
"**/*.test.tsx",
|
|
||||||
"jest.config.ts"
|
"jest.config.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user