Repository navigation
test(intercom): make no-version identify tests omit apiVersion and drop duplicate - #5749
Conversation
…drop duplicate The "No Version" identify tests (intercom-identify-test-11..13) set `apiVersion: undefined` on the destination object instead of in Config, so Config.apiVersion stayed 'v1' and they exercised v1 (/users, Intercom-Version 1.4). Their success criteria also claimed v1 is the default, while the transform defaults to v2 when apiVersion is not set. Give them a Config without apiVersion, expect the v2 output the transform produces (/contacts, Intercom-Version 2.10, v2 payload), and add the contact search mocks they need. Test 13 now uses a distinct email so its search finds an existing contact and it covers the update path its description names. Remove intercom-validation-test-5, an exact duplicate of intercom-validation-test-4. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified in the tests-only corrections to Intercom’s default-v2 coverage.
No open issues 🎉
What changed in this PR
This tests-only PR corrects Intercom processor coverage for configurations without apiVersion, verifying the existing v2 default without changing production behavior.
Changes:
- Update three identify cases to omit
Config.apiVersionand expect v2 contact creation or update payloads. - Add search mocks and distinct update-case input to exercise both paths.
- Remove a duplicate validation test.
| File | Description |
|---|---|
test/integrations/destinations/intercom/processor/validationTestData.ts |
Removes duplicate missing-parameter validation coverage. |
test/integrations/destinations/intercom/processor/identifyTestData.ts |
Corrects missing-version fixtures, expectations, and descriptions for v2 behavior. |
test/integrations/destinations/intercom/network.ts |
Adds contact-search mocks for the corrected create and update cases. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5749 +/- ##
========================================
Coverage 92.42% 92.42%
========================================
Files 741 741
Lines 41048 41048
Branches 9635 9634 -1
========================================
Hits 37938 37938
Misses 2848 2848
Partials 262 262 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|



What are the changes introduced in this PR?
Fixes two problems in the Intercom processor component tests. Tests only — no production code changes.
1. "No Version" identify tests didn't test a missing
apiVersion(intercom-identify-test-11,-12,-13){ ...v1Destination, apiVersion: undefined }, which setsapiVersionon the destination object, not inConfig.Config.apiVersionstayed'v1', so they exercised v1 (/users,Intercom-Version: 1.4).Config.apiVersionis not set (procWorkflow.yaml,apiVersionstep).ConfigwithoutapiVersionand expect the v2 output the transform produces:intercom-identify-test-11POST /contactswithexternal_id(fromcontext.traits.userId)intercom-identify-test-12POST /contactsintercom-identify-test-13PUT /contacts/<id>[email protected]). Tests 12 and 13 previously had identical traits, so they sent the same search and could not take different paths; with a distinct email, 13 covers the update path its description names.POST /contacts/searchmocks these cases need (network.ts).2. Duplicate validation test removed
intercom-validation-test-5was identical tointercom-validation-test-4(same input, output and description) apart from its id.What is the related Linear task?
Related to INT-7442
Please explain the objectives of your changes below
Make the Intercom processor tests test what their descriptions claim.
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
N/A — tests only.
Any new dependencies introduced with this change?
N/A
Any new generic utility introduced or modified. Please explain the changes.
N/A
Any technical or performance related pointers to consider with the change?
N/A
Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
Any documentation changes needed with this change?
Is the PR limited to 10 file changes?
Is the PR limited to one linear task?
Are relevant unit and component test-cases added in new readability format?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.
Testing
src/cdk/v2/destinations/intercom): 54/54 pass.src/secretPaths/secretPaths.jsonunchanged.🤖 Generated with Claude Code