-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[NT-485] Tracking event for Update Pledge #920
Conversation
β¦update-pledge-event
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.
Review w/ @Scollaco
@@ -96,6 +96,7 @@ public class PledgeViewModel: PledgeViewModelType, PledgeViewModelInputs, Pledge | |||
let context = initialData.map { $0.3 } | |||
|
|||
let backing = project.map { $0.personalization.backing }.skipNil() | |||
let projectAndBacking = Signal.combineLatest(project, backing) |
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.
I don't need to use this anymore
|> Backing.lens.status .~ .pledged | ||
|> Backing.lens.shippingAmount .~ 10 | ||
|> Backing.lens.amount .~ 700 | ||
) |
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.
I can remove this and just use the template.
state: .successful, | ||
backing: .init( | ||
clientSecret: "client-secret", | ||
requiresAction: true |
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.
going to default this to false b/c we're not testing SCA flow.
updateBackingResult: .success(updateBackingEnvelope) | ||
) | ||
|
||
withEnvironment(apiService: mockService, currentUser: .template) { |
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.
removing environment call and adding an additional test to test .updateReward
context.
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.
Also added an additional test to make sure the tracking event is not triggered in changePaymentMethod
context.
@@ -3427,4 +3427,44 @@ final class PledgeViewModelTests: TestCase { | |||
self.showErrorBannerWithMessage.assertDidNotEmitValue() | |||
} | |||
} | |||
|
|||
func testTrackingEvents() { |
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.
Rename to testTrackingEvents_ContextIsUpdate()
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.
π
π² What
Improvements in monitoring user behavior for v1 checkout. This tracks updated pledges.
π€ Why
We now have the
Update Pledge Button Clicked
event.β Acceptance criteria
Note: Update Pledge Event should not trigger when changing a payment method
Update Pledge
. Change your pledge amount and tapConfirm
, you should see the"Update Pledge Button Clicked"
triggered.Update Pledge
. Change your shipping location and tapConfirm
, you should see the"Update Pledge Button Clicked"
triggered.Choose another reward
. Change your reward and tapSelect
, then tapConfirm
, you should see the"Update Pledge Button Clicked"
triggered.