-
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
Conversation
f0c0e74
to
7086178
Compare
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.
PR Summary
This pull request updates the Zapier integration tests and related utilities, focusing on improved flexibility and support for new data structures in the Twenty CRM system.
- Modified
packages/twenty-zapier/src/test/authentication.test.ts
to be less brittle by checking for a defined error message instead of a specific one - Updated
packages/twenty-zapier/src/test/creates/crud_record.test.ts
to accommodate new data formats forlinkedinLink
,xLink
, andphones
fields - Added
list
andplaceholder
properties inpackages/twenty-zapier/src/test/utils/computeInputFields.test.ts
andpackages/twenty-zapier/src/utils/computeInputFields.ts
- Removed test file exclusions in
packages/twenty-zapier/tsconfig.json
, allowing TypeScript compilation of test files
5 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings | Greptile
expect(response.data).toHaveProperty('currentWorkspace'); | ||
expect(response.data.currentWorkspace).toHaveProperty('displayName'); |
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.
linkedinLink: { | ||
primaryLinkUrl: '/linkedin_url', | ||
primaryLinkLabel: 'Test linkedinUrl', | ||
secondaryLinks: [ | ||
'{ url: "/linkedin_url2", label: "Test linkedinUrl2" }', | ||
], | ||
}, |
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: The secondaryLinks
are stored as a string representation of an object, which may cause issues when parsing. Consider using a proper object structure instead of a string.
xLink: { | ||
primaryLinkUrl: '/x_url', | ||
primaryLinkLabel: 'Test xUrl', | ||
secondaryLinks: ['{ url: "/x_url2", label: "Test xUrl2" }'], | ||
}, |
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: Similar to the linkedinLink
, the xLink
secondaryLinks
are stored as a string. Ensure this is the intended format and that it can be properly parsed.
phones: { | ||
primaryPhoneNumber: '610203040', | ||
primaryPhoneCountryCode: '+33', | ||
additionalPhones: ['{number: "610203041", countryCode: "+33"}'], | ||
}, |
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: The additionalPhones
field is using a string representation of an object. This might cause parsing issues. Consider using a proper object structure.
See title
See title