Skip to content

Commit

Permalink
Add screenshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
tillh-stripe committed Nov 19, 2024
1 parent e50fad6 commit a5be5de
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ internal class NetworkingLinkSignupPreviewParameterProvider :
emailEntered(),
invalidEmail(),
instantDebits(),
instantDebitsInvalidPhoneNumber(),
)

private fun default() = NetworkingLinkSignupState(
Expand Down Expand Up @@ -109,6 +110,35 @@ internal class NetworkingLinkSignupPreviewParameterProvider :
isInstantDebits = true,
)

private fun instantDebitsInvalidPhoneNumber() = NetworkingLinkSignupState(
payload = Success(
NetworkingLinkSignupState.Payload(
merchantName = "Test",
emailController = EmailConfig.createController(
initialValue = "[email protected]",
),
phoneController = PhoneNumberController.createPhoneNumberController(
initialValue = "5555555555",
initiallySelectedCountryCode = "US",
),
isInstantDebits = true,
content = linkLoginPane(),
)
),
validEmail = "[email protected]",
validPhone = "5555555555",
lookupAccount = Success(
ConsumerSessionLookup(
exists = false,
consumerSession = null,
errorMessage = null
)
),
saveAccountToLink = Uninitialized,
isInstantDebits = true,
phoneError = "The phone number provided was invalid.",
)

private fun networkingLinkSignupPane() = NetworkingLinkSignupPane(
aboveCta = "By saving your account to Link, you agree to Link’s Terms and Privacy Policy",
body = NetworkingLinkSignupBody(
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a5be5de

Please sign in to comment.