-
Notifications
You must be signed in to change notification settings - Fork 12.9k
chore: replaces use of legacy livechat:saveCustomFields with new endpoint in api test helpers
#37767
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
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
WalkthroughThe test file for livechat custom-fields is updated to migrate from a deprecated JSON-RPC methodCall to a REST API endpoint. The call now uses POST to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #37767 +/- ##
===========================================
- Coverage 67.78% 67.71% -0.08%
===========================================
Files 3452 3452
Lines 113975 113975
Branches 20940 20940
===========================================
- Hits 77262 77174 -88
- Misses 34580 34673 +93
+ Partials 2133 2128 -5
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/meteor/tests/data/livechat/custom-fields.ts (1)
25-27: Consider aligning callback return type with implementation.The callback is typed as returning
voidbut usesreturn reject(err)for early exit. While this is a common JavaScript pattern, you can either remove the explicit: voidannotation or remove thereturnkeyword to satisfy the type checker.Based on static analysis hints.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
apps/meteor/tests/data/livechat/custom-fields.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
apps/meteor/tests/data/livechat/custom-fields.ts
🧬 Code graph analysis (1)
apps/meteor/tests/data/livechat/custom-fields.ts (1)
apps/meteor/tests/data/api-data.ts (1)
credentials(39-42)
🪛 Biome (2.1.2)
apps/meteor/tests/data/livechat/custom-fields.ts
[error] 27-27: The function should not return a value because its return type is void.
The function is here:
'void' signals the absence of value. The returned value is likely to be ignored by the caller.
(lint/correctness/noVoidTypeReturn)
🔇 Additional comments (2)
apps/meteor/tests/data/livechat/custom-fields.ts (2)
4-4: LGTM: Import changes align with API migration.The updated imports correctly reflect the shift from JSON-RPC style
methodCallto REST API calls.
22-29: The endpoint migration is correct. The REST endpointPOST /livechat/custom-fields.saveaccepts the payload structure{ customFieldId: null, customFieldData: customField }as confirmed by the endpoint definition, and returns the response withcustomFieldnested in the body as{ success: true, customField: ... }. This migration aligns with the deprecated Meteor methodlivechat:saveCustomFieldand is consistently used across the codebase.
Proposed changes (including videos or screenshots)
This PR replaces the use of the legacy method;
livechat:saveCustomFieldsin the api test helper functions.Issue(s)
Steps to test or reproduce
Further comments
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.