Skip to content
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

Fix end to end tests. #10059

Merged
merged 2 commits into from
Feb 1, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class CreateCardTokenActivityTest {
onView(withId(StripeR.id.card_number_edit_text))
.perform(replaceText("4242424242424242"))
onView(withId(StripeR.id.expiry_date_edit_text))
.perform(replaceText("01/25"))
.perform(replaceText("01/45"))
onView(withId(StripeR.id.cvc_edit_text))
.perform(replaceText("111"))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class ComposeExampleActivity : AppCompatActivity() {
PaymentMethodCreateParams.Card.Builder()
.setNumber("4000000000003238")
.setExpiryMonth(1)
.setExpiryYear(2025)
.setExpiryYear(2045)
.setCvc("123")
.build()
)
Expand All @@ -171,7 +171,7 @@ class ComposeExampleActivity : AppCompatActivity() {
PaymentMethodCreateParams.Card.Builder()
.setNumber("4000000000003063")
.setExpiryMonth(1)
.setExpiryYear(2025)
.setExpiryYear(2045)
.setCvc("123")
.build()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class PaymentAuthActivity : StripeIntentActivity() {
PaymentMethodCreateParams.Card.Builder()
.setNumber("4000000000003238")
.setExpiryMonth(1)
.setExpiryYear(2025)
.setExpiryYear(2045)
.setCvc("123")
.build()
)
Expand All @@ -110,7 +110,7 @@ class PaymentAuthActivity : StripeIntentActivity() {
PaymentMethodCreateParams.Card.Builder()
.setNumber("4000000000003063")
.setExpiryMonth(1)
.setExpiryYear(2025)
.setExpiryYear(2045)
.setCvc("123")
.build()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ internal class StripeEndToEndTest {
card = PaymentMethodCreateParams.Card(
number = number,
expiryMonth = 1,
expiryYear = 2025,
expiryYear = 2045,
cvc = "123"
)
)
Expand Down Expand Up @@ -148,7 +148,7 @@ internal class StripeEndToEndTest {
country = "US",
cvcCheck = "unchecked",
expiryMonth = 12,
expiryYear = 2025,
expiryYear = 2045,
last4 = "4242",
funding = CardFunding.Credit,
threeDSecureStatus = SourceTypeModel.Card.ThreeDSecureStatus.Optional
Expand All @@ -167,7 +167,7 @@ internal class StripeEndToEndTest {
.isEqualTo(
Card(
expMonth = 12,
expYear = 2025,
expYear = 2045,
id = card.id,
name = "Jenny Rosen",
last4 = "4242",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal object CardParamsFixtures {
val DEFAULT = CardParams(
number = CardNumberFixtures.VISA_NO_SPACES,
expMonth = 12,
expYear = 2025,
expYear = 2045,
cvc = "123",
name = "Jenny Rosen",
address = AddressFixtures.ADDRESS,
Expand All @@ -28,7 +28,7 @@ internal object CardParamsFixtures {
loggingTokens = setOf(CardInputWidget.LOGGING_TOKEN),
number = CardNumberFixtures.VISA_NO_SPACES,
expMonth = 12,
expYear = 2025,
expYear = 2045,
cvc = "123"
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CardParamsTest {
mapOf(
"number" to "4242424242424242",
"exp_month" to 12,
"exp_year" to 2025,
"exp_year" to 2045,
"cvc" to "123",
"name" to "Jenny Rosen",
"currency" to "usd",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ internal object GooglePayFixtures {
"description": "Visa •••• 1234",
"tokenizationData": {
"type": "PAYMENT_GATEWAY",
"token": "{\n \"id\": \"tok_1GW4JpL6pqDH2fD\",\n \"object\": \"token\",\n \"card\": {\n \"id\": \"card_1GW4JpL6pqDHo\",\n \"object\": \"card\",\n \"address_city\": \"San Francisco\",\n \"address_country\": \"US\",\n \"address_line1\": \"510 Townsend St\",\n \"address_line1_check\": \"unchecked\",\n \"address_line2\": null,\n \"address_state\": \"MD\",\n \"address_zip\": \"20895\",\n \"address_zip_check\": \"unchecked\",\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"cvc_check\": null,\n \"dynamic_last4\": \"4242\",\n \"exp_month\": 12,\n \"exp_year\": 2025,\n \"funding\": \"credit\",\n \"last4\": \"1234\",\n \"metadata\": {\n },\n \"name\": \"Jenny Rosen\",\n \"tokenization_method\": \"android_pay\"\n },\n \"client_ip\": \"74.12.182.19\",\n \"created\": 1586453857,\n \"livemode\": false,\n \"type\": \"card\",\n \"used\": false\n}\n"
"token": "{\n \"id\": \"tok_1GW4JpL6pqDH2fD\",\n \"object\": \"token\",\n \"card\": {\n \"id\": \"card_1GW4JpL6pqDHo\",\n \"object\": \"card\",\n \"address_city\": \"San Francisco\",\n \"address_country\": \"US\",\n \"address_line1\": \"510 Townsend St\",\n \"address_line1_check\": \"unchecked\",\n \"address_line2\": null,\n \"address_state\": \"MD\",\n \"address_zip\": \"20895\",\n \"address_zip_check\": \"unchecked\",\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"cvc_check\": null,\n \"dynamic_last4\": \"4242\",\n \"exp_month\": 12,\n \"exp_year\": 2045,\n \"funding\": \"credit\",\n \"last4\": \"1234\",\n \"metadata\": {\n },\n \"name\": \"Jenny Rosen\",\n \"tokenization_method\": \"android_pay\"\n },\n \"client_ip\": \"74.12.182.19\",\n \"created\": 1586453857,\n \"livemode\": false,\n \"type\": \"card\",\n \"used\": false\n}\n"
},
"type": "CARD",
"info": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ internal object PaymentIntentFixtures {
},
"country": "US",
"exp_month": 1,
"exp_year": 2025,
"exp_year": 2045,
"funding": "credit",
"generated_from": null,
"last4": "3063",
Expand Down Expand Up @@ -871,7 +871,7 @@ internal object PaymentIntentFixtures {
},
"country": "IE",
"exp_month": 1,
"exp_year": 2025,
"exp_year": 2045,
"funding": "credit",
"generated_from": null,
"last4": "3238",
Expand Down Expand Up @@ -953,7 +953,7 @@ internal object PaymentIntentFixtures {
},
"country": "US",
"exp_month": 12,
"exp_year": 2025,
"exp_year": 2045,
"funding": "credit",
"generated_from": null,
"last4": "4242",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class PaymentMethodCreateParamsTest {
card = PaymentMethodCreateParams.Card(
number = CardNumberFixtures.VISA_NO_SPACES,
expiryMonth = 12,
expiryYear = 2025,
expiryYear = 2045,
cvc = "123",
attribution = setOf("CardInputView")
),
Expand Down Expand Up @@ -371,7 +371,7 @@ class PaymentMethodCreateParamsTest {
val card = PaymentMethodCreateParams.Card(
number = CardNumberFixtures.VISA_NO_SPACES,
expiryMonth = 12,
expiryYear = 2025,
expiryYear = 2045,
cvc = "123",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ class PaymentMethodUpdateParamsTest {
assertThat(
PaymentMethodUpdateParams.createCard(
expiryMonth = 12,
expiryYear = 2025,
expiryYear = 2045,
allowRedisplay = PaymentMethod.AllowRedisplay.UNSPECIFIED
).toParamMap()
).containsEntry("allow_redisplay", "unspecified")

assertThat(
PaymentMethodUpdateParams.createCard(
expiryMonth = 12,
expiryYear = 2025,
expiryYear = 2045,
allowRedisplay = PaymentMethod.AllowRedisplay.LIMITED
).toParamMap()
).containsEntry("allow_redisplay", "limited")

assertThat(
PaymentMethodUpdateParams.createCard(
expiryMonth = 12,
expiryYear = 2025,
expiryYear = 2045,
allowRedisplay = PaymentMethod.AllowRedisplay.ALWAYS
).toParamMap()
).containsEntry("allow_redisplay", "always")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ internal object SetupIntentFixtures {
},
"country": "IE",
"exp_month": 1,
"exp_year": 2025,
"exp_year": 2045,
"funding": "credit",
"generated_from": null,
"last4": "3238",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class SourceParamsTest {
"card" to mapOf(
"number" to VISA_NO_SPACES,
"exp_month" to 12,
"exp_year" to 2025,
"exp_year" to 2045,
"cvc" to "123"
),
"owner" to mapOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"country": "US",
"display_brand": "visa",
"exp_month": 4,
"exp_year": 2025,
"exp_year": 2045,
"funding": "credit",
"generated_from": null,
"last4": "4242",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"country": "US",
"display_brand": "visa",
"exp_month": 5,
"exp_year": 2025,
"exp_year": 2045,
"funding": "credit",
"generated_from": null,
"last4": "0101",
Expand Down Expand Up @@ -89,7 +89,7 @@
"country": "US",
"display_brand": "visa",
"exp_month": 5,
"exp_year": 2025,
"exp_year": 2045,
"funding": "credit",
"generated_from": null,
"last4": "0101",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ internal object PaymentIntentFixtures {
},
"country": "IE",
"exp_month": 1,
"exp_year": 2025,
"exp_year": 2045,
"funding": "credit",
"generated_from": null,
"last4": "3238",
Expand Down Expand Up @@ -457,7 +457,7 @@ internal object PaymentIntentFixtures {
},
"country": "US",
"exp_month": 12,
"exp_year": 2025,
"exp_year": 2045,
"funding": "credit",
"generated_from": null,
"last4": "4242",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ internal object SetupIntentFixtures {
},
"country": "IE",
"exp_month": 1,
"exp_year": 2025,
"exp_year": 2045,
"funding": "credit",
"generated_from": null,
"last4": "3238",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ internal class LinkInlineSignupConfirmationDefinitionTest {
CardParams(
number = "4242424242424242",
expMonth = 7,
expYear = 2025,
expYear = 2045,
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ internal class EndToEndTest {
CardParams(
number = "4242424242424242",
expMonth = 1,
expYear = 2025,
expYear = 2045,
cvc = "123"
)
)
Expand Down
Loading