-
Notifications
You must be signed in to change notification settings - Fork 105
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
Explicitly log user-initiated cancellations of the Subscription Linking dialog #3423
Explicitly log user-initiated cancellations of the Subscription Linking dialog #3423
Conversation
@@ -69,6 +69,18 @@ export class SubscriptionLinkingFlow { | |||
args, | |||
/* shouldFadeBody= */ false | |||
); | |||
|
|||
activityIframeView.onCancel(() => { | |||
const CompletionStatus = AnalyticsEvent.EVENT_SUBSCRIPTION_LINKING_FAILED; |
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.
Could this variable name be camel cased?
go/tsjs-style#naming-rules-by-identifier-type
Could you write a unit test (or tests) to cover this cancellation? |
@@ -127,4 +131,15 @@ describes.realWin('SubscriptionLinkingFlow', (env) => { | |||
).to.eventually.be.rejectedWith('Dialog error'); | |||
}); | |||
}); | |||
|
|||
it.only('resolves promise with success=false when cancelled', async () => { |
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.
Could you remove the .only
?
This PR adds an
onCancel
handler within the Subscription Linking flow, which now emits the NEWACTION_SUBSCRIPTION_LINKING_CLOSE
event. The second parameter inlogSwgEvent
specifies that this was a user-initaited action to disambiguate the two.User-initiated event example, from when a user closes the window: