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

Instant Debits: wrote UI tests for Instant Debits #3585

Merged
merged 3 commits into from
May 24, 2024

Conversation

kgaidis-stripe
Copy link
Contributor

@kgaidis-stripe kgaidis-stripe commented May 15, 2024

Summary

This PR adds tests for Instant Debits in Payment Sheet.

This was the PR that introduced Instant Debits:

This PR also introduces a new field in the Payment Sheet app ("supported payment methods"). It's a little funky, but I copied what Android did:

Testing

Tests passed in PR/bitrise (https://app.bitrise.io/build/18ab4632-a2fb-4740-905e-43b319c79fd7):

    ✔ testPaymentIntent_instantDebits on 'Clone 2 of iPhone 12 mini - PaymentSheetUITest-Runner (18516)' (41.433 seconds)
    ✔ testSetupIntent_instantDebits on 'Clone 2 of iPhone 12 mini - PaymentSheetUITest-Runner (18516)' (44.803 seconds)

Tests passed in Xcode:

Screenshot 2024-05-16 at 1 24 50 PM

This is the new field:

Simulator Screenshot - Clone 1 of iPhone 12 mini - 2024-05-16 at 13 21 57

@@ -95,6 +95,8 @@ struct PaymentSheetTestPlayground: View {
SettingPickerView(setting: $playgroundController.settings.currency)
SettingPickerView(setting: merchantCountryBinding)
SettingView(setting: $playgroundController.settings.apmsEnabled)
TextField("Supported Payment Methods (comma separated)", text: supportedPaymentMethodsBinding)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little funky, but copied from Android: stripe/stripe-android#8428

Base automatically changed from kg-instadeb to master May 20, 2024 20:40
Copy link

emerge-tools bot commented May 20, 2024

📸 Snapshot Test

No snapshots generated

Name Version Added Removed Modified Unchanged Errored Approval
StripePaymentsSize
com.stripe.StripePaymentsSize
1.0 (1) 0 0 0 0 0 N/A
StripeSize
com.stripe.StripeSize
1.0 (1) 0 0 0 0 0 N/A
StripePaymentsUISize
com.stripe.StripePaymentsUISize
1.0 (1) 0 0 0 0 0 N/A
StripeFinancialConnectionsSize
com.stripe.StripeFinancialConnectionsSize
1.0 (1) 0 0 0 0 0 N/A
StripeApplePaySize
com.stripe.StripeApplePaySize
1.0 (1) 0 0 0 0 0 N/A
StripePaymentSheetSize
com.stripe.StripePaymentSheetSize
1.0 (1) 0 0 0 0 0 N/A

🛸 Powered by Emerge Tools

kgaidis-stripe added a commit that referenced this pull request May 20, 2024
## Summary

my [recently merged PR](#3528)
intersected with another [recently merged
PR](#3592) so right now there
are build errors on `master`

## Testing

Build now succeeds & make sure tests pass on the PR (this Instant Debits
feature is actually unreleased and am still iterating on it as we speak
so will be testing it a lot in [other
PR's](#3585) too)
@kgaidis-stripe kgaidis-stripe force-pushed the kg-instadeb-tests branch 3 times, most recently from 13b8db2 to 7af9e23 Compare May 21, 2024 20:15
@kgaidis-stripe kgaidis-stripe marked this pull request as ready for review May 21, 2024 21:29
@kgaidis-stripe kgaidis-stripe requested review from a team as code owners May 21, 2024 21:29
@stripe stripe deleted a comment from github-actions bot May 21, 2024
@stripe stripe deleted a comment from emerge-tools bot May 21, 2024
@kgaidis-stripe
Copy link
Contributor Author

kgaidis-stripe commented May 22, 2024

Updated the PR so UI tests work with iOS 17 too (not just IOS 16):

ac9463e

Copy link

emerge-tools bot commented May 22, 2024

⚠️ 3 new unused protocols, 6 builds increased size

Name Version Download Change Install Change Approval
StripePaymentsSize
com.stripe.StripePaymentsSize
1.0 (1) 1.1 MB ⬆️ 359 B (0.03%) 3.9 MB ⬆️ 1.3 kB (0.03%) N/A
StripeSize
com.stripe.StripeSize
1.0 (1) 2.3 MB ⬆️ 798 B (0.03%) 7.6 MB ⬆️ 1.7 kB (0.02%) N/A
StripePaymentsUISize
com.stripe.StripePaymentsUISize
1.0 (1) 1.8 MB ⬆️ 241 B (0.01%) 6.1 MB ⬆️ 1.3 kB (0.02%) N/A
StripeFinancialConnectionsSize
com.stripe.StripeFinancialConnectionsSize
1.0 (1) 1.2 MB ⬆️ 28 B 3.9 MB ⬆️ 116 B N/A
StripeApplePaySize
com.stripe.StripeApplePaySize
1.0 (1) 422.6 kB ⬆️ 232 B (0.05%) 1.5 MB ⬆️ 116 B N/A
StripePaymentSheetSize
com.stripe.StripePaymentSheetSize
1.0 (1) 3.2 MB ⬆️ 7.5 kB (0.23%) 9.7 MB ⬆️ 35.9 kB (0.37%) N/A

StripePaymentsSize 1.0 (1)
com.stripe.StripePaymentsSize

⚠️ Found new unused protocol: FormSpecPaymentHandler
⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 1.3 kB (0.03%)
Total download size change: ⬆️ 359 B (0.03%)

Largest size changes

Item Install Size Change
StripePayments.STPPaymentHandler._handleNextAction(forPayment,wit... ⬆️ 852 B
StripePayments.STPPaymentHandler.handleNextAction(for,with,return... ⬇️ -712 B
📝 StripePayments.STPPaymentHandler.init(apiClient,threeDSCustomizat... ⬆️ 504 B
Other ⬆️ 658 B
View Treemap

Image of diff

StripeSize 1.0 (1)
com.stripe.StripeSize

⚠️ Found new unused protocol: FormSpecPaymentHandler
⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 1.7 kB (0.02%)
Total download size change: ⬆️ 798 B (0.03%)

Largest size changes

Item Install Size Change
StripePayments.STPPaymentHandler._handleNextAction(forPayment,wit... ⬆️ 852 B
StripePayments.STPPaymentHandler.handleNextAction(for,with,return... ⬇️ -712 B
📝 StripePayments.STPPaymentHandler.init(apiClient,threeDSCustomizat... ⬆️ 504 B
Other ⬆️ 1.1 kB
View Treemap

Image of diff

StripePaymentsUISize 1.0 (1)
com.stripe.StripePaymentsUISize

⚠️ Found new unused protocol: FormSpecPaymentHandler
⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 1.3 kB (0.02%)
Total download size change: ⬆️ 241 B (0.01%)

Largest size changes

Item Install Size Change
StripePayments.STPPaymentHandler._handleNextAction(forPayment,wit... ⬆️ 852 B
StripePayments.STPPaymentHandler.handleNextAction(for,with,return... ⬇️ -712 B
📝 StripePayments.STPPaymentHandler.init(apiClient,threeDSCustomizat... ⬆️ 504 B
Other ⬆️ 658 B
View Treemap

Image of diff

StripeFinancialConnectionsSize 1.0 (1)
com.stripe.StripeFinancialConnectionsSize

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 116 B
Total download size change: ⬆️ 28 B

Largest size changes

Item Install Size Change
Other ⬆️ 116 B
View Treemap

Image of diff

StripeApplePaySize 1.0 (1)
com.stripe.StripeApplePaySize

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 116 B
Total download size change: ⬆️ 232 B (0.05%)

Largest size changes

Item Install Size Change
Other ⬆️ 116 B
View Treemap

Image of diff

StripePaymentSheetSize 1.0 (1)
com.stripe.StripePaymentSheetSize

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 35.9 kB (0.37%)
Total download size change: ⬆️ 7.5 kB (0.23%)

Largest size changes

Item Install Size Change
🗑 StripePaymentSheet.VerticalPaymentMethodListView.init(savedPaymen... ⬇️ -4.7 kB
📝 StripePaymentSheet.VerticalPaymentMethodListView.init(savedPaymen... ⬆️ 4.6 kB
🗑 StripePaymentSheet.VerticalPaymentMethodListSelection ⬇️ -3.9 kB
📝 StripePaymentSheet.VerticalSavedPaymentMethodsViewController.init... ⬆️ 2.8 kB
🗑 StripePaymentSheet.VerticalSavedPaymentMethodsViewController.init... ⬇️ -2.6 kB
View Treemap

Image of diff


🛸 Powered by Emerge Tools

@kgaidis-stripe
Copy link
Contributor Author

@bric-stripe

OK I made changes based on your feedback:

(...but it will require another approval as it dismissed the approve)

Copy link

@bric-stripe bric-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kgaidis-stripe kgaidis-stripe merged commit 669393c into master May 24, 2024
4 checks passed
@kgaidis-stripe kgaidis-stripe deleted the kg-instadeb-tests branch May 24, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants