Skip to content

Commit

Permalink
changes as asked by Partner (segmentio#1695)
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-ayoub-segment authored Nov 1, 2023
1 parent e9e7005 commit d19ce97
Show file tree
Hide file tree
Showing 44 changed files with 23 additions and 2,988 deletions.
Original file line number Diff line number Diff line change
@@ -1,250 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Testing snapshot for actions-movable-ink destination: categoryView action - all fields 1`] = `
Object {
"anonymous_id": "UNSa)YJoVcxD*x",
"categories": Array [
Object {
"id": "UNSa)YJoVcxD*x",
"url": "UNSa)YJoVcxD*x",
},
],
"event_name": "Category View",
"metadata": Object {
"testType": "UNSa)YJoVcxD*x",
},
"product": Array [
Object {
"id": "UNSa)YJoVcxD*x",
"price": 17360873282600.96,
"quantity": 1736087328260096,
"title": "UNSa)YJoVcxD*x",
"url": "UNSa)YJoVcxD*x",
},
],
"timestamp": "2021-02-01T00:00:00.000Z",
"timezone": "UNSa)YJoVcxD*x",
"user_id": "UNSa)YJoVcxD*x",
}
`;

exports[`Testing snapshot for actions-movable-ink destination: categoryView action - required fields 1`] = `
Object {
"anonymous_id": "UNSa)YJoVcxD*x",
"categories": Array [
Object {
"id": "UNSa)YJoVcxD*x",
},
],
"event_name": "Category View",
"metadata": Object {},
"timestamp": "2021-02-01T00:00:00.000Z",
"user_id": "UNSa)YJoVcxD*x",
}
`;

exports[`Testing snapshot for actions-movable-ink destination: conversion action - all fields 1`] = `
Object {
"anonymous_id": "PQ2QIzIjTB",
"event_name": "Conversion",
"metadata": Object {
"testType": "PQ2QIzIjTB",
},
"order_id": "PQ2QIzIjTB",
"products": Array [
Object {
"id": "PQ2QIzIjTB",
"price": -27320916618772.48,
"quantity": -2732091661877248,
"title": "PQ2QIzIjTB",
"url": "PQ2QIzIjTB",
},
],
"revenue": -27320916618772.48,
"timestamp": "2021-02-01T00:00:00.000Z",
"timezone": "PQ2QIzIjTB",
"user_id": "PQ2QIzIjTB",
}
`;

exports[`Testing snapshot for actions-movable-ink destination: conversion action - required fields 1`] = `
Object {
"anonymous_id": "PQ2QIzIjTB",
"event_name": "Conversion",
"metadata": Object {},
"order_id": "PQ2QIzIjTB",
"products": Array [
Object {
"id": "PQ2QIzIjTB",
},
],
"revenue": -27320916618772.48,
"timestamp": "2021-02-01T00:00:00.000Z",
"user_id": "PQ2QIzIjTB",
}
`;

exports[`Testing snapshot for actions-movable-ink destination: identify action - all fields 1`] = `
Object {
"anonymous_id": "jWk*N5b5E4VTiB6Q]",
"timestamp": "2021-02-01T00:00:00.000Z",
"timezone": "jWk*N5b5E4VTiB6Q]",
"user_id": "jWk*N5b5E4VTiB6Q]",
}
`;

exports[`Testing snapshot for actions-movable-ink destination: identify action - required fields 1`] = `
Object {
"anonymous_id": "jWk*N5b5E4VTiB6Q]",
"timestamp": "2021-02-01T00:00:00.000Z",
"user_id": "jWk*N5b5E4VTiB6Q]",
}
`;

exports[`Testing snapshot for actions-movable-ink destination: productAdded action - all fields 1`] = `
Object {
"anonymous_id": "C6eQ7krEG8NsPiQOr",
"categories": Array [
Object {
"id": "C6eQ7krEG8NsPiQOr",
"url": "C6eQ7krEG8NsPiQOr",
},
],
"event_name": "Cart Add",
"metadata": Object {
"testType": "C6eQ7krEG8NsPiQOr",
},
"product": Object {
"id": "C6eQ7krEG8NsPiQOr",
"price": 45880264370421.76,
"quantity": 4588026437042176,
"title": "C6eQ7krEG8NsPiQOr",
"url": "C6eQ7krEG8NsPiQOr",
},
"timestamp": "2021-02-01T00:00:00.000Z",
"timezone": "C6eQ7krEG8NsPiQOr",
"user_id": "C6eQ7krEG8NsPiQOr",
}
`;

exports[`Testing snapshot for actions-movable-ink destination: productAdded action - required fields 1`] = `
Object {
"anonymous_id": "C6eQ7krEG8NsPiQOr",
"event_name": "Cart Add",
"metadata": Object {},
"product": Object {
"id": "C6eQ7krEG8NsPiQOr",
},
"timestamp": "2021-02-01T00:00:00.000Z",
"user_id": "C6eQ7krEG8NsPiQOr",
}
`;

exports[`Testing snapshot for actions-movable-ink destination: productViewed action - all fields 1`] = `
Object {
"anonymous_id": ")X*ZnUpNWN@S4t]]",
"categories": Array [
Object {
"id": ")X*ZnUpNWN@S4t]]",
"url": ")X*ZnUpNWN@S4t]]",
},
],
"event_name": "Product Viewed",
"metadata": Object {
"testType": ")X*ZnUpNWN@S4t]]",
},
"product": Object {
"id": ")X*ZnUpNWN@S4t]]",
"price": 38988624020111.36,
"title": ")X*ZnUpNWN@S4t]]",
"url": ")X*ZnUpNWN@S4t]]",
},
"timestamp": "2021-02-01T00:00:00.000Z",
"timezone": ")X*ZnUpNWN@S4t]]",
"user_id": ")X*ZnUpNWN@S4t]]",
}
`;

exports[`Testing snapshot for actions-movable-ink destination: productViewed action - required fields 1`] = `
Object {
"anonymous_id": ")X*ZnUpNWN@S4t]]",
"event_name": "Product Viewed",
"metadata": Object {},
"product": Object {
"id": ")X*ZnUpNWN@S4t]]",
},
"timestamp": "2021-02-01T00:00:00.000Z",
"user_id": ")X*ZnUpNWN@S4t]]",
}
`;

exports[`Testing snapshot for actions-movable-ink destination: search action - all fields 1`] = `
Object {
"anonymous_id": "thvLm@$Yn7k917)bo",
"event_name": "Search",
"metadata": Object {
"testType": "thvLm@$Yn7k917)bo",
},
"query": "thvLm@$Yn7k917)bo",
"timestamp": "2021-02-01T00:00:00.000Z",
"timezone": "thvLm@$Yn7k917)bo",
"url": "thvLm@$Yn7k917)bo",
"user_id": "thvLm@$Yn7k917)bo",
}
`;

exports[`Testing snapshot for actions-movable-ink destination: search action - required fields 1`] = `
Object {
"anonymous_id": "thvLm@$Yn7k917)bo",
"event_name": "Search",
"metadata": Object {},
"query": "thvLm@$Yn7k917)bo",
"timestamp": "2021-02-01T00:00:00.000Z",
"user_id": "thvLm@$Yn7k917)bo",
}
`;

exports[`Testing snapshot for actions-movable-ink destination: sendCustomEvent action - all fields 1`] = `
Object {
"anonymous_id": "6eS[@]@T7H%oI]ro",
"categories": Array [
Object {
"id": "6eS[@]@T7H%oI]ro",
"url": "6eS[@]@T7H%oI]ro",
},
],
"event_name": "6eS[@]@T7H%oI]ro",
"metadata": Object {
"testType": "6eS[@]@T7H%oI]ro",
},
"order_id": "6eS[@]@T7H%oI]ro",
"products": Array [
Object {
"id": "6eS[@]@T7H%oI]ro",
"price": 38149067259248.64,
"quantity": 3814906725924864,
"title": "6eS[@]@T7H%oI]ro",
"url": "6eS[@]@T7H%oI]ro",
},
],
"revenue": 38149067259248.64,
"timestamp": "2021-02-01T00:00:00.000Z",
"timezone": "6eS[@]@T7H%oI]ro",
"user_id": "6eS[@]@T7H%oI]ro",
}
`;

exports[`Testing snapshot for actions-movable-ink destination: sendCustomEvent action - required fields 1`] = `
Object {
"anonymous_id": "6eS[@]@T7H%oI]ro",
"event_name": "6eS[@]@T7H%oI]ro",
"metadata": Object {},
"order_id": "6eS[@]@T7H%oI]ro",
"timestamp": "2021-02-01T00:00:00.000Z",
"user_id": "6eS[@]@T7H%oI]ro",
}
`;

exports[`Testing snapshot for actions-movable-ink destination: sendEntireEvent action - all fields 1`] = `
Object {
"testType": "LmFmzlF7F",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe(`Testing snapshot for ${destinationSlug} destination:`, () => {
it(`${actionSlug} action - all fields`, async () => {
const seedName = `${destinationSlug}#${actionSlug}`
const action = destination.actions[actionSlug]
const [eventData, settingsData] = generateTestData(seedName, destination, action, false)
const [eventData] = generateTestData(seedName, destination, action, false)

nock(/.*/).persist().get(/.*/).reply(200)
nock(/.*/).persist().post(/.*/).reply(200)
Expand All @@ -62,7 +62,11 @@ describe(`Testing snapshot for ${destinationSlug} destination:`, () => {
const responses = await testDestination.testAction(actionSlug, {
event: event,
mapping: event.properties,
settings: settingsData,
settings: {
movable_ink_url: 'https://www.test.com',
username: 'test',
password: 'test'
},
auth: undefined
})

Expand Down
Loading

0 comments on commit d19ce97

Please sign in to comment.