-
Notifications
You must be signed in to change notification settings - Fork 662
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
Link Verification Dialog UI #10047
Merged
Merged
Link Verification Dialog UI #10047
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
aa5f0c3
2FA dialog UI
toluo-stripe e1e4234
Update tests
toluo-stripe db666eb
update screenshots
toluo-stripe 5c71636
Add activity test for Link Screen State
toluo-stripe 51bcf6b
Remove string literal
toluo-stripe 8d86b26
Revert "lokalise update"
toluo-stripe 4b01a2b
Add more tests
toluo-stripe 6b1235a
More cleanup
toluo-stripe 08e3f45
Rename changeEmail
toluo-stripe 15f3976
Clean up code
toluo-stripe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
paymentsheet/src/test/java/com/stripe/android/link/FakeNativeLinkComponent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.stripe.android.link | ||
|
||
import com.stripe.android.cards.CardAccountRangeRepository | ||
import com.stripe.android.core.Logger | ||
import com.stripe.android.link.account.FakeLinkAccountManager | ||
import com.stripe.android.link.account.FakeLinkAuth | ||
import com.stripe.android.link.account.LinkAccountManager | ||
import com.stripe.android.link.account.LinkAuth | ||
import com.stripe.android.link.analytics.FakeLinkEventsReporter | ||
import com.stripe.android.link.analytics.LinkEventsReporter | ||
import com.stripe.android.link.confirmation.FakeLinkConfirmationHandler | ||
import com.stripe.android.link.confirmation.LinkConfirmationHandler | ||
import com.stripe.android.link.injection.NativeLinkComponent | ||
import com.stripe.android.payments.core.analytics.ErrorReporter | ||
import com.stripe.android.testing.FakeErrorReporter | ||
import com.stripe.android.testing.FakeLogger | ||
import com.stripe.android.utils.NullCardAccountRangeRepositoryFactory | ||
import org.mockito.kotlin.mock | ||
|
||
internal class FakeNativeLinkComponent( | ||
override val linkAccountManager: LinkAccountManager = FakeLinkAccountManager(), | ||
override val configuration: LinkConfiguration = TestFactory.LINK_CONFIGURATION, | ||
override val linkEventsReporter: LinkEventsReporter = FakeLinkEventsReporter(), | ||
override val logger: Logger = FakeLogger(), | ||
override val linkConfirmationHandlerFactory: LinkConfirmationHandler.Factory = LinkConfirmationHandler.Factory { | ||
FakeLinkConfirmationHandler() | ||
}, | ||
override val webLinkActivityContract: WebLinkActivityContract = mock(), | ||
override val cardAccountRangeRepositoryFactory: CardAccountRangeRepository.Factory = | ||
NullCardAccountRangeRepositoryFactory, | ||
override val viewModel: LinkActivityViewModel = mock(), | ||
override val errorReporter: ErrorReporter = FakeErrorReporter(), | ||
override val linkAuth: LinkAuth = FakeLinkAuth() | ||
) : NativeLinkComponent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'm not sure this is the right fix here -- we probably don't want to default this to doing nothing. If we were to introduce a new use of VerificationViewModel that did show the change email button, this would be a foot gun for making that button unresponsive.
I was thinking that there might be a way to not require this parameter when we are not going to show the change email button
I'm ok merging this for now and we can figure out a better solution later