-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix zapier tests #7568
Fix zapier tests #7568
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,18 @@ describe('creates.create_company', () => { | |
crudZapierOperation: Operation.create, | ||
name: 'Company Name', | ||
address: { addressCity: 'Paris' }, | ||
domainName: 'Company Domain Name', | ||
linkedinLink: { url: '/linkedin_url', label: 'Test linkedinUrl' }, | ||
xLink: { url: '/x_url', label: 'Test xUrl' }, | ||
linkedinLink: { | ||
primaryLinkUrl: '/linkedin_url', | ||
primaryLinkLabel: 'Test linkedinUrl', | ||
secondaryLinks: [ | ||
'{ url: "/linkedin_url2", label: "Test linkedinUrl2" }', | ||
], | ||
}, | ||
Comment on lines
+18
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: The |
||
xLink: { | ||
primaryLinkUrl: '/x_url', | ||
primaryLinkLabel: 'Test xUrl', | ||
secondaryLinks: ['{ url: "/x_url2", label: "Test xUrl2" }'], | ||
}, | ||
Comment on lines
+25
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: Similar to the |
||
annualRecurringRevenue: { | ||
amountMicros: 100000000000, | ||
currencyCode: 'USD', | ||
|
@@ -49,8 +58,11 @@ describe('creates.create_company', () => { | |
nameSingular: 'Person', | ||
crudZapierOperation: Operation.create, | ||
name: { firstName: 'John', lastName: 'Doe' }, | ||
email: '[email protected]', | ||
phone: '+33610203040', | ||
phones: { | ||
primaryPhoneNumber: '610203040', | ||
primaryPhoneCountryCode: '+33', | ||
additionalPhones: ['{number: "610203041", countryCode: "+33"}'], | ||
}, | ||
Comment on lines
+61
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: The |
||
city: 'Paris', | ||
}); | ||
const result = await appTester( | ||
|
@@ -64,11 +76,13 @@ describe('creates.create_company', () => { | |
requestDb( | ||
z, | ||
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, | ||
); | ||
expect(checkDbResult.data.person.phone).toEqual('+33610203040'); | ||
expect(checkDbResult.data.person.phones.primaryPhoneNumber).toEqual( | ||
'610203040', | ||
); | ||
}); | ||
}); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: These expectations are unreachable if an error is thrown. Consider moving them before the try-catch block or removing them.