Skip to content

Commit

Permalink
chore: add without products test-case for payment info entered
Browse files Browse the repository at this point in the history
  • Loading branch information
Sai Sankeerth committed Sep 26, 2024
1 parent c943bb7 commit 46bc057
Showing 1 changed file with 125 additions and 0 deletions.
125 changes: 125 additions & 0 deletions test/integrations/destinations/facebook_conversions/processor/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,131 @@ export const data = [
},
mockFns: defaultMockFns,
},
{
name: 'facebook_conversions',
description: 'Track event with standard event payment info entered without products',
feature: 'processor',
module: 'destination',
version: 'v0',
input: {
request: {
body: [
{
message: {
anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1',
channel: 'web',
context: {
device: {
id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R',
manufacturer: 'Xiaomi',
model: 'Redmi 6',
name: 'xiaomi',
},
network: {
carrier: 'Banglalink',
},
os: {
name: 'android',
version: '8.1.0',
},
screen: {
height: '100',
density: 50,
},
traits: {
email: ' [email protected] ',
address: {
zip: 1234,
},
anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1',
},
},
event: 'payment info entered',
integrations: {
All: true,
},
message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8',
properties: {
application_tracking_enabled: 1,
content_name: 'Checkout',
content_type: 'product',
num_items: 1,
id: '12809',
price: 80,
quantity: 1,
revenue: 93.99,
},
timestamp: '2023-11-12T15:46:51.693229+05:30',
type: 'track',
},
destination: {
Config: {
limitedDataUsage: true,
blacklistPiiProperties: [
{
blacklistPiiProperties: '',
blacklistPiiHash: false,
},
],
accessToken: '09876',
datasetId: 'dummyID',
eventsToEvents: [
{
from: '',
to: '',
},
],
eventCustomProperties: [
{
eventCustomProperties: '',
},
],
removeExternalId: true,
whitelistPiiProperties: [
{
whitelistPiiProperties: '',
},
],
actionSource: 'website',
},
Enabled: true,
},
},
],
},
},
output: {
response: {
status: 200,
body: [
{
output: {
version: '1',
type: 'REST',
method: 'POST',
endpoint: 'https://graph.facebook.com/v20.0/dummyID/events?access_token=09876',
headers: {},
params: {},
body: {
JSON: {},
XML: {},
JSON_ARRAY: {},
FORM: {
data: [
'{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"AddPaymentInfo","event_time":1699784211,"action_source":"website","custom_data":{"application_tracking_enabled":1,"content_name":"Checkout","content_type":"product","num_items":1,"id":"12809","price":80,"quantity":1,"revenue":93.99,"content_ids":["12809"],"contents":[{"id":"12809","quantity":1,"item_price":80}],"currency":"USD","value":93.99}}',
],
},
},
files: {},
userId: '',
},
statusCode: 200,
},
],
},
},
mockFns: defaultMockFns,
},
{
name: 'facebook_conversions',
description:
Expand Down

0 comments on commit 46bc057

Please sign in to comment.