Skip to content

Adds missing eec object properties#23

Open
Kevpedia wants to merge 2 commits intofacebook:mainfrom
Kevpedia:adds-missing-eec-object-properties
Open

Adds missing eec object properties#23
Kevpedia wants to merge 2 commits intofacebook:mainfrom
Kevpedia:adds-missing-eec-object-properties

Conversation

@Kevpedia
Copy link

No description provided.

@Kevpedia
Copy link
Author

supposed to be for issue #21

@Kevpedia
Copy link
Author

I think I accidentally clicked to close this PR before as I was creating it...

@Kevpedia
Copy link
Author

note for the reviewer: there appears to be a bug in GTM template UI. When I tried to run tests for this it would say "Invalid Input" and not run any tests at all; but if I muted any random test it would run all tests successfully. I reported that to Google, so we'll see... but seems like a memory issue (setup+tests can only be so big?)

return {
id: prod.id,
quantity: prod.quantity
quantity: (prod.quantity || 1),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a fallback of 1 for quantity for each item in contents array (quantity should always be at least 1...)

id: prod.id,
quantity: prod.quantity
quantity: (prod.quantity || 1),
title: prod.name,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mapped properties title, item_price, and category from items name, price, and category properties

\ mock\nlet success, failure;\nmock('injectScript', (url, onsuccess, onfailure)\
\ => {\n success = onsuccess;\n failure = onfailure;\n onsuccess();\n});\n\n\
mock('copyFromWindow', key => {\n if (key === 'fbq') return () => {};\n});"
\ [{\n id: 'i1',\n quantity: 1,\n title: 'n1',\n item_price:\
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated test to include the additional properties

@Kevpedia
Copy link
Author

is anyone maintaining this repo? looks like the last commit was in Nov 2020 from @sahava... nothing since facebook incubator took over?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants