8000 [🛤] NT-925 Two-Factor Confirmation Viewed event by eoji · Pull Request #768 · kickstarter/android-oss · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[🛤] NT-925 Two-Factor Confirmation Viewed event #768

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

Merged
merged 2 commits into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/src/main/java/com/kickstarter/libs/Koala.java
Original file line number Diff line number Diff line change
Expand Up @@ -746,5 +746,9 @@ public void trackSignUpButtonClicked() {
public void trackSignUpSubmitButtonClicked() {
this.client.track(LakeEvent.SIGN_UP_SUBMIT_BUTTON_CLICKED);
}

public void trackTwoFactorConfirmationViewed() {
this.client.track(LakeEvent.TWO_FACTOR_CONFIRMATION_VIEWED);
}
//endregion
}
1 change: 1 addition & 0 deletions app/src/main/java/com/kickstarter/libs/LakeEvent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ const val LOG_IN_OR_SIGN_UP_PAGE_VIEWED = "Log In or Sign Up Page Viewed"
const val LOG_IN_SUBMIT_BUTTON_CLICKED = "Log In Submit Button Clicked"
const val SIGN_UP_BUTTON_CLICKED = "Sign Up Button Clicked"
const val SIGN_UP_SUBMIT_BUTTON_CLICKED = "Sign Up Submit Button Clicked"
const val TWO_FACTOR_CONFIRMATION_VIEWED = "Two-Factor Confirmation Viewed"
// endregion
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public ViewModel(final @NonNull Environment environment) {
.subscribe(__ -> this.koala.trackLoginError());

this.koala.trackTwoFactorAuthView();
this.lake.trackTwoFactorConfirmationViewed();
}

private void success(final @NonNull AccessTokenEnvelope envelope) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public void testTwoFactorViewModel_FormValidation() {
this.formIsValid.assertValues(true, false);

this.koalaTest.assertValue(KoalaEvent.TWO_FACTOR_AUTH_CONFIRM_VIEW);
this.lakeTest.assertValue("Two-Factor Confirmation Viewed");
}

@Test
Expand All @@ -72,6 +73,7 @@ public void testTwoFactorViewModel_TfaSuccess() {
this.tfaSuccess.assertValueCount(1);

this.koalaTest.assertValues(KoalaEvent.TWO_FACTOR_AUTH_CONFIRM_VIEW, KoalaEvent.LOGIN);
this.lakeTest.assertValue("Two-Factor Confirmation Viewed");
}

@Test
Expand All @@ -95,6 +97,7 @@ public void testTwoFactorViewModel_TfaSuccessFacebook() {
this.tfaSuccess.assertValueCount(1);

this.koalaTest.assertValues(KoalaEvent.TWO_FACTOR_AUTH_CONFIRM_VIEW, KoalaEvent.LOGIN);
this.lakeTest.assertValue("Two-Factor Confirmation Viewed");
}

@Test
Expand All @@ -114,6 +117,7 @@ public void testTwoFactorViewModel_ResendCode() {

this.showResendCodeConfirmation.assertValueCount(1);
this.koalaTest.assertValues(KoalaEvent.TWO_FACTOR_AUTH_CONFIRM_VIEW, KoalaEvent.TWO_FACTOR_AUTH_RESEND_CODE);
this.lakeTest.assertValue("Two-Factor Confirmation Viewed");
}

@Test
Expand All @@ -133,6 +137,7 @@ public void testTwoFactorViewModel_ResendCodeFacebook() {

this.showResendCodeConfirmation.assertValueCount(1);
this.koalaTest.assertValues(KoalaEvent.TWO_FACTOR_AUTH_CONFIRM_VIEW, KoalaEvent.TWO_FACTOR_AUTH_RESEND_CODE);
this.lakeTest.assertValue("Two-Factor Confirmation Viewed");
}

@Test
Expand Down Expand Up @@ -170,6 +175,7 @@ Observable<AccessTokenEnvelope> login(final @NonNull String email, final @NonNul
this.tfaSuccess.assertNoValues();
this.genericTfaError.assertValueCount(1);
this.koalaTest.assertValues(KoalaEvent.TWO_FACTOR_AUTH_CONFIRM_VIEW, KoalaEvent.ERRORED_USER_LOGIN);
this.lakeTest.assertValue("Two-Factor Confirmation Viewed");
}

@Test
Expand Down Expand Up @@ -205,5 +211,6 @@ Observable<AccessTokenEnvelope> login(final @NonNull String email, final @NonNul
this.tfaSuccess.assertNoValues();
this.tfaCodeMismatchError.assertValueCount(1);
this.koalaTest.assertValues(KoalaEvent.TWO_FACTOR_AUTH_CONFIRM_VIEW, KoalaEvent.ERRORED_USER_LOGIN);
this.lakeTest.assertValue("Two-Factor Confirmation Viewed");
}
}
0