Skip to content

Commit

Permalink
Use correct defaultPath for messageId (#1041)
Browse files Browse the repository at this point in the history
  • Loading branch information
simpajj authored Feb 14, 2023
1 parent b057e9e commit b00de72
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`Testing snapshot for Ripe's group destination action: all fields 1`] =
Object {
"anonymousId": "DY&TUQqmpg2I",
"groupId": "DY&TUQqmpg2I",
"messageId": "2159444d-cdb6-52df-84de-11853deccb7e",
"messageId": Any<String>,
"timestamp": Any<String>,
"traits": Object {
"testType": "DY&TUQqmpg2I",
Expand All @@ -17,6 +17,7 @@ exports[`Testing snapshot for Ripe's group destination action: required fields 1
Object {
"anonymousId": "anonId1234",
"groupId": "DY&TUQqmpg2I",
"messageId": Any<String>,
"timestamp": Any<String>,
"traits": Object {},
"userId": "user1234",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe(`Testing snapshot for ${destinationSlug}'s ${actionSlug} destination ac
try {
const json = JSON.parse(rawBody)
expect(json).toMatchSnapshot({
messageId: expect.any(String),
timestamp: expect.any(String)
})
return
Expand Down Expand Up @@ -70,6 +71,7 @@ describe(`Testing snapshot for ${destinationSlug}'s ${actionSlug} destination ac
try {
const json = JSON.parse(rawBody)
expect(json).toMatchSnapshot({
messageId: expect.any(String),
timestamp: expect.any(String)
})
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const action: ActionDefinition<Settings, Payload> = {
required: false,
description: 'The Segment messageId',
label: 'MessageId',
default: { '@path': '$messageId' }
default: { '@path': '$.messageId' }
}
},
perform: (request, { payload, settings }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Object {
"context": Object {
"groupId": "ojywl7GMKZU*opR%8",
},
"messageId": "7dbfec72-3264-59dd-8983-99027cd3e162",
"messageId": Any<String>,
"timestamp": Any<String>,
"traits": Object {
"testType": "ojywl7GMKZU*opR%8",
Expand All @@ -19,6 +19,7 @@ exports[`Testing snapshot for Ripe's identify destination action: required field
Object {
"anonymousId": "anonId1234",
"context": Object {},
"messageId": Any<String>,
"timestamp": Any<String>,
"traits": Object {},
"userId": "user1234",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe(`Testing snapshot for ${destinationSlug}'s ${actionSlug} destination ac
try {
const json = JSON.parse(rawBody)
expect(json).toMatchSnapshot({
messageId: expect.any(String),
timestamp: expect.any(String)
})
return
Expand Down Expand Up @@ -70,6 +71,7 @@ describe(`Testing snapshot for ${destinationSlug}'s ${actionSlug} destination ac
try {
const json = JSON.parse(rawBody)
expect(json).toMatchSnapshot({
messageId: expect.any(String),
timestamp: expect.any(String)
})
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const action: ActionDefinition<Settings, Payload> = {
required: false,
description: 'The Segment messageId',
label: 'MessageId',
default: { '@path': '$messageId' }
default: { '@path': '$.messageId' }
}
},
perform: (request, { payload, settings }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Object {
"url": "http://fujav.cx/ef",
},
},
"messageId": "22c96ec8-da18-5ccf-90bb-f92dfd44a98e",
"messageId": Any<String>,
"name": "Gm^2vj@raF9m",
"properties": Object {
"testType": "Gm^2vj@raF9m",
Expand All @@ -33,6 +33,7 @@ Object {
"url": "https://segment.com/academy/",
},
},
"messageId": Any<String>,
"properties": Object {},
"timestamp": Any<String>,
"userId": "user1234",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe(`Testing snapshot for ${destinationSlug}'s ${actionSlug} destination ac
try {
const json = JSON.parse(rawBody)
expect(json).toMatchSnapshot({
messageId: expect.any(String),
timestamp: expect.any(String)
})
return
Expand Down Expand Up @@ -71,6 +72,7 @@ describe(`Testing snapshot for ${destinationSlug}'s ${actionSlug} destination ac
try {
const json = JSON.parse(rawBody)
expect(json).toMatchSnapshot({
messageId: expect.any(String),
timestamp: expect.any(String)
})
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const action: ActionDefinition<Settings, Payload> = {
required: false,
description: 'The Segment messageId',
label: 'MessageId',
default: { '@path': '$messageId' }
default: { '@path': '$.messageId' }
}
},
perform: (request, { payload, settings }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Object {
"groupId": "f6t8rQsKdU^N",
},
"event": "f6t8rQsKdU^N",
"messageId": "2b7e8d4e-2a59-53b3-b51a-8830d6a1ceea",
"messageId": Any<String>,
"name": "f6t8rQsKdU^N",
"properties": Object {
"testType": "f6t8rQsKdU^N",
Expand All @@ -22,6 +22,7 @@ Object {
"anonymousId": "anonId1234",
"context": Object {},
"event": "f6t8rQsKdU^N",
"messageId": Any<String>,
"name": "f6t8rQsKdU^N",
"properties": Object {
"event": "f6t8rQsKdU^N",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe(`Testing snapshot for ${destinationSlug}'s ${actionSlug} destination ac
try {
const json = JSON.parse(rawBody)
expect(json).toMatchSnapshot({
messageId: expect.any(String),
timestamp: expect.any(String)
})
return
Expand Down Expand Up @@ -70,6 +71,7 @@ describe(`Testing snapshot for ${destinationSlug}'s ${actionSlug} destination ac
try {
const json = JSON.parse(rawBody)
expect(json).toMatchSnapshot({
messageId: expect.any(String),
timestamp: expect.any(String)
})
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const action: ActionDefinition<Settings, Payload> = {
required: false,
description: 'The Segment messageId',
label: 'MessageId',
default: { '@path': '$messageId' }
default: { '@path': '$.messageId' }
}
},
perform: (request, { payload, settings }) => {
Expand Down

0 comments on commit b00de72

Please sign in to comment.