-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for getting anonymousId by note attributes array (#…
- Loading branch information
Showing
7 changed files
with
77 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// This file contains the test scenarios for the server-side events from the Shopify GraphQL API for | ||
// the v1 transformation flow | ||
import { mockFns } from '../mocks'; | ||
import { dummySourceConfig } from '../constants'; | ||
import { dummySourceConfig, note_attributes } from '../constants'; | ||
|
||
export const checkoutEventsTestScenarios = [ | ||
{ | ||
|
@@ -27,7 +26,7 @@ export const checkoutEventsTestScenarios = [ | |
updated_at: '2024-11-05T21:22:02-05:00', | ||
landing_site: '/', | ||
note: '', | ||
note_attributes: [], | ||
note_attributes, | ||
referring_site: '', | ||
shipping_lines: [], | ||
shipping_address: [], | ||
|
@@ -145,7 +144,7 @@ export const checkoutEventsTestScenarios = [ | |
updated_at: '2024-11-05T21:22:02-05:00', | ||
landing_site: '/', | ||
note: '', | ||
note_attributes: [], | ||
note_attributes, | ||
referring_site: '', | ||
shipping_lines: [], | ||
shipping_address: [], | ||
|
@@ -237,7 +236,7 @@ export const checkoutEventsTestScenarios = [ | |
traits: { | ||
shippingAddress: [], | ||
}, | ||
anonymousId: '5d3e2cb6-4011-5c9c-b7ee-11bc1e905097', | ||
anonymousId: '50ead33e-d763-4854-b0ab-765859ef05cb', | ||
}, | ||
], | ||
}, | ||
|
@@ -269,7 +268,7 @@ export const checkoutEventsTestScenarios = [ | |
created_at: '2024-09-16T03:50:1500:00', | ||
updated_at: '2024-09-17T03:29:02-04:00', | ||
note: '', | ||
note_attributes: [], | ||
note_attributes, | ||
shipping_address: { | ||
first_name: 'testuser', | ||
address1: 'oakwood bridge', | ||
|
@@ -396,7 +395,7 @@ export const checkoutEventsTestScenarios = [ | |
output: { | ||
batch: [ | ||
{ | ||
anonymousId: '5d3e2cb6-4011-5c9c-b7ee-11bc1e905097', | ||
anonymousId: '50ead33e-d763-4854-b0ab-765859ef05cb', | ||
context: { | ||
cart_token: 'Z2NwLXVzLWVhc3QxOjAxSjdXRjdOQjY0NlFFNFdQVEg0MTRFM1E2', | ||
integration: { | ||
|
@@ -415,7 +414,7 @@ export const checkoutEventsTestScenarios = [ | |
created_at: '2024-09-16T03:50:1500:00', | ||
updated_at: '2024-09-17T03:29:02-04:00', | ||
note: '', | ||
note_attributes: [], | ||
note_attributes, | ||
shipping_address: { | ||
first_name: 'testuser', | ||
address1: 'oakwood bridge', | ||
|
@@ -680,7 +679,7 @@ export const checkoutEventsTestScenarios = [ | |
merchant_of_record_app_id: null, | ||
name: '#1017', | ||
note: null, | ||
note_attributes: [], | ||
note_attributes, | ||
number: 17, | ||
order_number: 1017, | ||
order_status_url: | ||
|
@@ -988,7 +987,7 @@ export const checkoutEventsTestScenarios = [ | |
merchant_of_record_app_id: null, | ||
name: '#1017', | ||
note: null, | ||
note_attributes: [], | ||
note_attributes, | ||
number: 17, | ||
order_number: 1017, | ||
order_status_url: | ||
|
@@ -1289,7 +1288,7 @@ export const checkoutEventsTestScenarios = [ | |
}, | ||
}, | ||
timestamp: '2024-11-06T02:54:50.000Z', | ||
anonymousId: '5d3e2cb6-4011-5c9c-b7ee-11bc1e905097', | ||
anonymousId: '50ead33e-d763-4854-b0ab-765859ef05cb', | ||
}, | ||
], | ||
}, | ||
|
@@ -1326,6 +1325,7 @@ export const checkoutEventsTestScenarios = [ | |
current_total_tax: '0.00', | ||
email: '[email protected]', | ||
name: '#1017', | ||
note_attributes, | ||
order_number: 1017, | ||
order_status_url: | ||
'https://pixel-testing-rs.myshopify.com/59026964593/orders/676613a0027fc8240e16d67fdc9f5ac8/authenticate?key=a70bbe7ec8abcc46b77e4331e4df8c60', | ||
|
@@ -1486,6 +1486,7 @@ export const checkoutEventsTestScenarios = [ | |
current_total_tax: '0.00', | ||
email: '[email protected]', | ||
name: '#1017', | ||
note_attributes, | ||
order_number: 1017, | ||
order_status_url: | ||
'https://pixel-testing-rs.myshopify.com/59026964593/orders/676613a0027fc8240e16d67fdc9f5ac8/authenticate?key=a70bbe7ec8abcc46b77e4331e4df8c60', | ||
|
@@ -1675,7 +1676,7 @@ export const checkoutEventsTestScenarios = [ | |
}, | ||
}, | ||
timestamp: '2024-11-06T02:54:50.000Z', | ||
anonymousId: '5d3e2cb6-4011-5c9c-b7ee-11bc1e905097', | ||
anonymousId: '50ead33e-d763-4854-b0ab-765859ef05cb', | ||
}, | ||
], | ||
}, | ||
|
@@ -1684,4 +1685,4 @@ export const checkoutEventsTestScenarios = [ | |
}, | ||
}, | ||
}, | ||
].map((d1) => ({ ...d1, mockFns })); | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// This file contains the test scenarios for the server-side events from the Shopify GraphQL API for | ||
// the v1 transformation flow | ||
import { mockFns } from '../mocks'; | ||
import { dummySourceConfig } from '../constants'; | ||
import { dummySourceConfig, note_attributes } from '../constants'; | ||
|
||
export const genericTrackTestScenarios = [ | ||
{ | ||
|
@@ -24,6 +24,7 @@ export const genericTrackTestScenarios = [ | |
token: 'Z2NwLXVzLWVhc3QxOjAxSjdXRjdOQjY0NlFFNFdQVEg0MTRFM1E2', | ||
line_items: [], | ||
note: '', | ||
note_attributes, | ||
updated_at: '2024-09-17T08:15:13.280Z', | ||
created_at: '2024-09-16T03:50:15.478Z', | ||
}, | ||
|
@@ -43,7 +44,7 @@ export const genericTrackTestScenarios = [ | |
output: { | ||
batch: [ | ||
{ | ||
anonymousId: '5d3e2cb6-4011-5c9c-b7ee-11bc1e905097', | ||
anonymousId: '50ead33e-d763-4854-b0ab-765859ef05cb', | ||
context: { | ||
integration: { | ||
name: 'SHOPIFY', | ||
|
@@ -58,6 +59,7 @@ export const genericTrackTestScenarios = [ | |
id: 'Z2NwLXVzLWVhc3QxOjAxSjdXRjdOQjY0NlFFNFdQVEg0MTRFM1E2', | ||
line_items: [], | ||
note: '', | ||
note_attributes, | ||
token: 'Z2NwLXVzLWVhc3QxOjAxSjdXRjdOQjY0NlFFNFdQVEg0MTRFM1E2', | ||
updated_at: '2024-09-17T08:15:13.280Z', | ||
}, | ||
|
@@ -149,7 +151,7 @@ export const genericTrackTestScenarios = [ | |
merchant_of_record_app_id: null, | ||
name: '#1017', | ||
note: null, | ||
note_attributes: [], | ||
note_attributes, | ||
order_number: 1017, | ||
original_total_additional_fees_set: null, | ||
original_total_duties_set: null, | ||
|
@@ -363,7 +365,7 @@ export const genericTrackTestScenarios = [ | |
merchant_of_record_app_id: null, | ||
name: '#1017', | ||
note: null, | ||
note_attributes: [], | ||
note_attributes, | ||
order_number: 1017, | ||
original_total_additional_fees_set: null, | ||
original_total_duties_set: null, | ||
|
@@ -545,7 +547,7 @@ export const genericTrackTestScenarios = [ | |
traits: { | ||
email: '[email protected]', | ||
}, | ||
anonymousId: '5d3e2cb6-4011-5c9c-b7ee-11bc1e905097', | ||
anonymousId: '50ead33e-d763-4854-b0ab-765859ef05cb', | ||
}, | ||
], | ||
}, | ||
|