-
Notifications
You must be signed in to change notification settings - Fork 995
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
Show checkbox for sepa based payment methods to set allow_redisplay #4503
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
ec1fa5c
Show checkbox for sepa based payment methods to set allow_redisplay
wooj-stripe fa0f374
no need to pass in spec
wooj-stripe 819d1d5
Fix fc sepa test
wooj-stripe 86b0961
in progress
wooj-stripe 07097b8
in progress
wooj-stripe c2798a6
Sepa always has a mandate
wooj-stripe d0d3715
get snapshot tests working
wooj-stripe d0fdcd0
update test
wooj-stripe 2f88641
rerecord
wooj-stripe e7e31ea
update network recorded tests
wooj-stripe e7c2c53
Add snapshot tests for setup debit pi and si
wooj-stripe 255e16f
adding two more snapshot tests
wooj-stripe 37e5c77
updating per review
wooj-stripe ff20deb
Merge branch 'master' into wooj/sepaAllowRedisplay
wooj-stripe a8e1002
lint
wooj-stripe ff45e91
Merge branch 'master' into wooj/sepaAllowRedisplay
wooj-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
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 |
---|---|---|
|
@@ -552,7 +552,8 @@ class PaymentSheetStandardLPMUITwoTests: PaymentSheetStandardLPMUICase { | |
settings.customerMode = .new | ||
settings.applePayEnabled = .off // disable Apple Pay | ||
settings.mode = .setup | ||
settings.customerKeyType = .legacy // TODO: Change to customerSessions when adding save checkbox for SEPA settings.allowsDelayedPMs = .on | ||
settings.customerKeyType = .customerSession | ||
settings.allowsDelayedPMs = .on | ||
loadPlayground(app, settings) | ||
|
||
let paymentMethodButton = app.buttons["Payment method"] | ||
|
@@ -562,17 +563,7 @@ class PaymentSheetStandardLPMUITwoTests: PaymentSheetStandardLPMUICase { | |
// Save SEPA | ||
app.buttons["+ Add"].waitForExistenceAndTap() | ||
tapPaymentMethod("SEPA Debit") | ||
|
||
app.textFields["Full name"].tap() | ||
app.typeText("John Doe" + XCUIKeyboardKey.return.rawValue) | ||
app.typeText("[email protected]" + XCUIKeyboardKey.return.rawValue) | ||
app.typeText("AT611904300234573201" + XCUIKeyboardKey.return.rawValue) | ||
app.textFields["Address line 1"].tap() | ||
app.typeText("510 Townsend St" + XCUIKeyboardKey.return.rawValue) | ||
app.typeText("Floor 3" + XCUIKeyboardKey.return.rawValue) | ||
app.typeText("San Francisco" + XCUIKeyboardKey.return.rawValue) | ||
app.textFields["ZIP"].tap() | ||
app.typeText("94102" + XCUIKeyboardKey.return.rawValue) | ||
try! fillSepaData(app, iban: "AT611904300234573201", tapCheckboxWithText: "Save this account for future Example, Inc. payments") | ||
app.buttons["Continue"].tap() | ||
app.buttons["Confirm"].waitForExistenceAndTap() | ||
XCTAssertTrue(app.staticTexts["Success!"].waitForExistence(timeout: 10.0)) | ||
|
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 |
---|---|---|
|
@@ -30,7 +30,7 @@ class PaymentSheetVerticalUITests: PaymentSheetUITestCase { | |
settings.mode = .setup | ||
settings.customerMode = .new | ||
settings.currency = .eur | ||
settings.customerKeyType = .legacy // TODO: Change to customerSessions when adding save checkbox for SEPA | ||
settings.customerKeyType = .customerSession | ||
settings.uiStyle = .flowController | ||
settings.layout = .vertical | ||
loadPlayground(app, settings) | ||
|
@@ -72,7 +72,7 @@ class PaymentSheetVerticalUITests: PaymentSheetUITestCase { | |
XCTAssertEqual(app.textFields["Card number"].value as? String, "1, Your card number is invalid.") | ||
app.textFields["Card number"].clearText() | ||
// Finish the card payment | ||
try! fillCardData(app, cardNumber: "4242424242424242") | ||
try! fillCardData(app, cardNumber: "4242424242424242", tapCheckboxWithText: "Save payment details to Example, Inc. for future purchases") | ||
continueButton.tap() | ||
XCTAssertEqual(paymentMethodButton.label, "•••• 4242, card, 12345, US") | ||
app.buttons["Confirm"].tap() | ||
|
@@ -89,10 +89,10 @@ class PaymentSheetVerticalUITests: PaymentSheetUITestCase { | |
|
||
// Add a SEPA Debit PM | ||
app.buttons["SEPA Debit"].tap() | ||
try! fillSepaData(app) | ||
try! fillSepaData(app, tapCheckboxWithText: "Save this account for future Example, Inc. payments") | ||
continueButton.tap() | ||
XCTAssertEqual(paymentMethodButton.label, "SEPA Debit, sepa_debit, 123 Main, San Francisco, CA, 94016, US") | ||
app.buttons["Confirm"].tap() | ||
XCTAssertEqual(paymentMethodButton.label, "SEPA Debit, sepa_debit, John Doe, [email protected], 123 Main, San Francisco, CA, 94016, US") | ||
app.buttons["Confirm"].waitForExistenceAndTap(timeout: 3.0) | ||
XCTAssertTrue(app.staticTexts["Success!"].waitForExistence(timeout: 10)) | ||
XCTAssertEqual( | ||
analyticsLog.map({ $0[string: "event"]! }).filter({ $0.starts(with: "mc") }), | ||
|
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
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
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.
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 also see a TODO like this in PaymentSheetStandardLPMUIOneTests.testSEPADebitPaymentMethod_PaymentSheet. Should we update that one too?
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.
YES! thank you!!