-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Report purchase events to mParticle when bundling ecommerce data #50
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1756,6 +1756,7 @@ user.getUserIdentities is not a function,\n`; | |
baz: 'bar', | ||
}; | ||
|
||
debugger; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. noobie question, but wouldn't this pause the process of the test running and should be removed? I might be wrong There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes this is a mistake. I left it here. We should never have |
||
mParticle.forwarder.process({ | ||
EventName: 'eCommerce - Purchase', | ||
EventDataType: MessageType.Commerce, | ||
|
@@ -1832,6 +1833,8 @@ user.getUserIdentities is not a function,\n`; | |
var purchaseEventProperties = window.braze.purchaseEventProperties[0]; | ||
|
||
purchaseEventProperties.should.eql(expectedPurchaseEvent); | ||
|
||
reportService.event.should.be.ok(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like this should be more like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think being more specific is a good call. Will update. |
||
}); | ||
|
||
it('should call changeUser and openSession on init with userIdentificationType MPID passed in forwarding settings', function() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't this be
return reportEvent === true
? thats how at least other log events functions have it as and I think it makes sense in case its nottrue
? but also the video you shared for testing seems to be working as expectedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good attention to detail! Yes so it seems that Braze returns
true
from when you call their login method already, so, so doing justreturn reportEvent
is fine. I'm not sure why we do returnreportEvent === true
since it is essentially the same thing. For now, to be consistent, I will just follow that format even though it's unnecessary, but I can make a ticket to refactor in the future to just return the boolean instead of the equivalence.