Skip to content

Commit 16d4e64

Browse files
needcaffeineclaude
andauthored
fix: incorrect description for Display & Video 360 and SendGrid, fix test case (#3649)
* Fix incorrect enable_batching description for Display & Video 360 The description incorrectly referenced "TikTok Audiences" instead of "Display & Video 360", causing the List Supported Destinations API to return wrong metadata for this destination. * Fix copy-paste errors in destination descriptions across DV360, SendGrid, and Trade Desk Several destinations had field descriptions or test names incorrectly referencing other destinations due to copy-paste. Also regenerates stale DV360 generated-types and adds a regression test for the enable_batching description. Co-Authored-By: Claude Opus 4.6 <[email protected]> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
1 parent 82af8dc commit 16d4e64

7 files changed

Lines changed: 36 additions & 26 deletions

File tree

packages/destination-actions/src/destinations/display-video-360/__tests__/index.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import nock from 'nock'
22
import { createTestIntegration, IntegrationError } from '@segment/actions-core'
33
import Destination from '../index'
4+
import { enable_batching } from '../properties'
45
import { GET_AUDIENCE_URL, CREATE_AUDIENCE_URL, OAUTH_URL } from '../constants'
56

67
const advertiserId = '424242'
@@ -48,6 +49,12 @@ const getAudienceResponse = [
4849
]
4950

5051
describe('Display Video 360', () => {
52+
describe('field definitions', () => {
53+
it('enable_batching description should reference Display & Video 360', () => {
54+
expect(enable_batching.description).toContain('Display & Video 360')
55+
})
56+
})
57+
5158
beforeEach(() => {
5259
process.env.ACTIONS_DISPLAY_VIDEO_360_CLIENT_ID = 'Clientz'
5360
process.env.ACTIONS_DISPLAY_VIDEO_360_CLIENT_SECRET = 'Scretz'

packages/destination-actions/src/destinations/display-video-360/addToAudience/generated-types.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/destination-actions/src/destinations/display-video-360/properties.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const partner_provided_id: InputField = {
3434

3535
export const enable_batching: InputField = {
3636
label: 'Enable Batching',
37-
description: 'Enable batching of requests to the TikTok Audiences.',
37+
description: 'Enable batching of requests to the Display & Video 360.',
3838
type: 'boolean',
3939
default: true,
4040
required: true,

packages/destination-actions/src/destinations/display-video-360/removeFromAudience/generated-types.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/destination-actions/src/destinations/sendgrid-audiences/syncAudience/fields.ts

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ export const fields: Record<string, InputField> = {
1212
default: {
1313
'@path': '$.context.personas.computation_class'
1414
},
15-
choices: [{ label: 'audience', value: 'audience' },{ label: 'journey_step', value: 'journey_step' }]
15+
choices: [
16+
{ label: 'audience', value: 'audience' },
17+
{ label: 'journey_step', value: 'journey_step' }
18+
]
1619
},
1720
external_audience_id: {
1821
type: 'string',
@@ -130,7 +133,7 @@ export const fields: Record<string, InputField> = {
130133
description: `The contact's city.`,
131134
type: 'string'
132135
},
133-
state_province_region: {
136+
state_province_region: {
134137
label: 'State/Province/Region',
135138
description: `The contact's state, province, or region.`,
136139
type: 'string'
@@ -147,68 +150,68 @@ export const fields: Record<string, InputField> = {
147150
}
148151
},
149152
default: {
150-
first_name: {
153+
first_name: {
151154
'@if': {
152155
exists: { '@path': '$.traits.first_name' },
153156
then: { '@path': '$.traits.first_name' },
154157
else: { '@path': '$.properties.first_name' }
155-
}
158+
}
156159
},
157-
last_name: {
160+
last_name: {
158161
'@if': {
159162
exists: { '@path': '$.traits.last_name' },
160163
then: { '@path': '$.traits.last_name' },
161164
else: { '@path': '$.properties.last_name' }
162-
}
165+
}
163166
},
164-
phone_number: {
167+
phone_number: {
165168
'@if': {
166169
exists: { '@path': '$.traits.phone' },
167170
then: { '@path': '$.traits.phone' },
168171
else: { '@path': '$.properties.phone' }
169-
}
172+
}
170173
},
171-
address_line_1: {
174+
address_line_1: {
172175
'@if': {
173176
exists: { '@path': '$.traits.street' },
174177
then: { '@path': '$.traits.street' },
175178
else: { '@path': '$.properties.street' }
176-
}
179+
}
177180
},
178-
address_line_2: {
181+
address_line_2: {
179182
'@if': {
180183
exists: { '@path': '$.traits.address_line_2' },
181184
then: { '@path': '$.traits.address_line_2' },
182185
else: { '@path': '$.properties.address_line_2' }
183-
}
186+
}
184187
},
185-
city: {
188+
city: {
186189
'@if': {
187190
exists: { '@path': '$.traits.city' },
188191
then: { '@path': '$.traits.city' },
189192
else: { '@path': '$.properties.city' }
190-
}
193+
}
191194
},
192-
state_province_region: {
195+
state_province_region: {
193196
'@if': {
194197
exists: { '@path': '$.traits.state' },
195198
then: { '@path': '$.traits.state' },
196199
else: { '@path': '$.properties.state' }
197-
}
200+
}
198201
},
199-
country: {
202+
country: {
200203
'@if': {
201204
exists: { '@path': '$.traits.country' },
202205
then: { '@path': '$.traits.country' },
203206
else: { '@path': '$.properties.country' }
204-
}
207+
}
205208
},
206-
postal_code: {
209+
postal_code: {
207210
'@if': {
208211
exists: { '@path': '$.traits.postal_code' },
209212
then: { '@path': '$.traits.postal_code' },
210213
else: { '@path': '$.properties.postal_code' }
211-
}
214+
}
212215
}
213216
}
214217
},
@@ -253,7 +256,7 @@ export const fields: Record<string, InputField> = {
253256
batch_size: {
254257
type: 'number',
255258
label: 'Max batch size',
256-
description: 'The maximum number of events to batch when sending data to Reddit.',
259+
description: 'The maximum number of events to batch when sending data to SendGrid.',
257260
unsafe_hidden: true,
258261
required: false,
259262
default: MAX_BATCH_SIZE

packages/destination-actions/src/destinations/sendgrid-audiences/syncAudience/generated-types.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/destination-actions/src/destinations/the-trade-desk-crm/__tests__/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ describe('The Trade Desk CRM', () => {
7070
await expect(testDestination.getAudience(getAudienceInput)).rejects.toThrowError()
7171
})
7272

73-
it('should succeed when Segment External ID matches Data Segment in TikTok', async () => {
73+
it('should succeed when Segment External ID matches Data Segment in The Trade Desk', async () => {
7474
nock(`${BASE_URL}/crmdata/segment/advertiser_id`)
7575
.get(/.*/)
7676
.reply(200, {

0 commit comments

Comments
 (0)