Skip to content

Commit

Permalink
chore: tc corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Chandra shekar Varkala committed Jan 11, 2024
1 parent 3d8c8f5 commit fcad73e
Show file tree
Hide file tree
Showing 146 changed files with 68,605 additions and 56,417 deletions.
136 changes: 108 additions & 28 deletions test/integrations/destinations/active_campaign/router/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export const data = [
eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03',
},
},
metadata: { jobId: 2, userId: 'u1' },
metadata: {
jobId: 2,
},
message: {
channel: 'web',
context: {
Expand All @@ -28,13 +30,21 @@ export const data = [
namespace: 'com.rudderlabs.javascript',
version: '1.0.0',
},
library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' },
library: {
name: 'RudderLabs JavaScript SDK',
version: '1.0.0',
},
userAgent:
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36',
locale: 'en-US',
ip: '0.0.0.0',
os: { name: '', version: '' },
screen: { density: 2 },
os: {
name: '',
version: '',
},
screen: {
density: 2,
},
},
messageId: '84e26acc-56a5-4835-8233-591137fca468',
session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22',
Expand All @@ -56,9 +66,18 @@ export const data = [
Random: 'random',
},
lists: [
{ id: 2, status: 'subscribe' },
{ id: 3, status: 'unsubscribe' },
{ id: 3, status: 'unsubscribexyz' },
{
id: 2,
status: 'subscribe',
},
{
id: 3,
status: 'unsubscribe',
},
{
id: 3,
status: 'unsubscribexyz',
},
],
address: {
city: 'kolkata',
Expand All @@ -68,7 +87,9 @@ export const data = [
street: '',
},
},
integrations: { All: true },
integrations: {
All: true,
},
sentAt: '2019-10-14T09:03:22.563Z',
},
},
Expand Down Expand Up @@ -96,10 +117,22 @@ export const data = [
lastName: 'Doe',
phone: '92374162212',
fieldValues: [
{ field: '0', value: 'Trastkiv' },
{ field: '1', value: 'Russia' },
{ field: '3', value: '||Potato||Onion||' },
{ field: '4', value: 'random' },
{
field: '0',
value: 'Trastkiv',
},
{
field: '1',
value: 'Russia',
},
{
field: '3',
value: '||Potato||Onion||',
},
{
field: '4',
value: 'random',
},
],
},
},
Expand All @@ -108,11 +141,18 @@ export const data = [
files: {},
method: 'POST',
params: {},
headers: { 'Api-Token': 'dummyApiToken', 'Content-Type': 'application/json' },
headers: {
'Api-Token': 'dummyApiToken',
'Content-Type': 'application/json',
},
version: '1',
endpoint: 'https://active.campaigns.rudder.com/api/3/contact/sync',
},
metadata: [{ jobId: 2, userId: 'u1' }],
metadata: [
{
jobId: 2,
},
],
batched: false,
statusCode: 200,
destination: {
Expand Down Expand Up @@ -148,7 +188,9 @@ export const data = [
eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03',
},
},
metadata: { jobId: 2, userId: 'u1' },
metadata: {
jobId: 2,
},
message: {
channel: 'web',
context: {
Expand All @@ -158,13 +200,24 @@ export const data = [
namespace: 'com.rudderlabs.javascript',
version: '1.0.0',
},
traits: { email: '[email protected]', anonymousId: '12345' },
library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' },
traits: {
email: '[email protected]',
anonymousId: '12345',
},
library: {
name: 'RudderLabs JavaScript SDK',
version: '1.0.0',
},
userAgent:
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36',
locale: 'en-US',
os: { name: '', version: '' },
screen: { density: 2 },
os: {
name: '',
version: '',
},
screen: {
density: 2,
},
},
request_ip: '1.1.1.1',
type: 'page',
Expand All @@ -181,7 +234,9 @@ export const data = [
title: 'Test Page',
url: 'https://www.rudderlabs.com',
},
integrations: { All: true },
integrations: {
All: true,
},
sentAt: '2019-10-14T11:15:53.296Z',
},
},
Expand All @@ -202,17 +257,28 @@ export const data = [
XML: {},
FORM: {},
JSON_ARRAY: {},
JSON: { siteTrackingDomain: { name: 'rudderlabs.com' } },
JSON: {
siteTrackingDomain: {
name: 'rudderlabs.com',
},
},
},
type: 'REST',
files: {},
method: 'POST',
params: {},
headers: { 'Api-Token': 'dummyApiToken', 'Content-Type': 'application/json' },
headers: {
'Api-Token': 'dummyApiToken',
'Content-Type': 'application/json',
},
version: '1',
endpoint: 'https://active.campaigns.rudder.com/api/3/siteTrackingDomains',
},
metadata: [{ jobId: 2, userId: 'u1' }],
metadata: [
{
jobId: 2,
},
],
batched: false,
statusCode: 200,
destination: {
Expand Down Expand Up @@ -246,7 +312,10 @@ export const data = [
sentAt: '2023-01-10T22:31:10.954Z',
channel: 'web',
context: {
os: { name: '', version: '' },
os: {
name: '',
version: '',
},
app: {
name: 'RudderLabs JavaScript SDK',
build: '1.0.0',
Expand All @@ -273,7 +342,10 @@ export const data = [
innerHeight: 782,
},
traits: {},
library: { name: 'RudderLabs JavaScript SDK', version: '2.20.0' },
library: {
name: 'RudderLabs JavaScript SDK',
version: '2.20.0',
},
campaign: {},
sessionId: 1673389635049,
userAgent:
Expand All @@ -297,7 +369,9 @@ export const data = [
receivedAt: '2023-01-10T22:31:11.612Z',
request_ip: '0.0.0.20',
anonymousId: '878e8f5f-9b6c-4aef-b5d3-1b970a13f17a',
integrations: { All: true },
integrations: {
All: true,
},
originalTimestamp: '2023-01-10T22:31:10.943Z',
},
destination: {
Expand All @@ -308,7 +382,9 @@ export const data = [
eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03',
},
},
metadata: { jobId: 5, userId: 'u1' },
metadata: {
jobId: 5,
},
},
],
destType: 'active_campaign',
Expand All @@ -332,7 +408,11 @@ export const data = [
module: 'destination',
},
statusCode: 400,
metadata: [{ jobId: 5, userId: 'u1' }],
metadata: [
{
jobId: 5,
},
],
batched: false,
destination: {
Config: {
Expand Down
49 changes: 24 additions & 25 deletions test/integrations/destinations/adj/processor/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2179,8 +2179,7 @@ export const data = [
status: 200,
body: [
{
error:
'App Token is not present. Please configure your app token from config dashbaord',
error: 'App Token is not present. Please configure your app token from config dashbaord',
statTags: {
destType: 'ADJ',
errorCategory: 'dataValidation',
Expand All @@ -2206,24 +2205,24 @@ export const data = [
body: [
{
message: {
type: 'track',
event: 'Application Installed',
sentAt: '2022-09-28T20:14:44.995Z',
userId: 'sample_user_id',
context: {
device: {
id: 'sample_device_id',
type: 'android',
advertisingId: '_sample',
},
traits: {
userId: '_sample_uid',
anonymousId: '_sample_anonid',
"type": "track",
"event": "Application Installed",
"sentAt": "2022-09-28T20:14:44.995Z",
"userId": "sample_user_id",
"context": {
"device": {
"id": "sample_device_id",
"type": "android",
"advertisingId": "_sample"
},
},
timestamp: '2022-09-28T20:14:43.314Z',
request_ip: '71.189.106.156',
originalTimestamp: '2022-09-28T20:14:44.995Z',
"traits": {
"userId": "_sample_uid",
"anonymousId": "_sample_anonid"
}
},
"timestamp": "2022-09-28T20:14:43.314Z",
"request_ip": "71.189.106.156",
"originalTimestamp": "2022-09-28T20:14:44.995Z"
},
destination: {
ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9',
Expand All @@ -2246,7 +2245,8 @@ export const data = [
},
Config: {
appToken: 'testAppToken',
customMappings: [{ from: 'Application Installed', to: '3fdmll' }],
customMappings: [
{ from: 'Application Installed', to: '3fdmll' }],
partnerParamsKeys: [
{ from: 'key1', to: 'partnerParamKey-1' },
{ from: 'key2', to: 'partnerParamKey-2' },
Expand Down Expand Up @@ -2277,10 +2277,10 @@ export const data = [
endpoint: 'https://s2s.adjust.com/event',
headers: { Accept: '*/*' },
params: {
event_token: '3fdmll',
ip_address: '71.189.106.156',
event_token: "3fdmll",
ip_address: "71.189.106.156",
android_id: 'sample_device_id',
gps_adid: '_sample',
gps_adid: "_sample",
s2s: 1,
app_token: 'testAppToken',
environment: 'production',
Expand All @@ -2294,5 +2294,4 @@ export const data = [
],
},
},
},
];
},];
Loading

0 comments on commit fcad73e

Please sign in to comment.