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

Don't enable the "save this card" checkbox by default #3076

Merged
merged 9 commits into from
Jun 5, 2024

Conversation

davidme-stripe
Copy link
Contributor

Summary

Change the "save this card" checkbox to be unchecked by default.

Motivation

Latest guidance.

Testing

CI, updated existing tests.

Changelog

Added a changelog entry.

@davidme-stripe davidme-stripe requested review from a team as code owners November 20, 2023 18:11
@davidme-stripe davidme-stripe requested review from kgaidis-stripe, a team and wooj-stripe and removed request for kgaidis-stripe and a team November 20, 2023 18:11
@davidme-stripe davidme-stripe marked this pull request as draft November 20, 2023 21:29
@davidme-stripe davidme-stripe removed the request for review from wooj-stripe November 20, 2023 21:30
@davidme-stripe davidme-stripe marked this pull request as ready for review June 5, 2024 22:53
Comment on lines 2642 to 2644
XCTAssertFalse(saveThisCardToggle.isSelected)
saveThisCardToggle.tap()

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: seems like we should add (for multiple of these)

        saveThisCardToggle.tap()
+       XCTAssertTrue(saveThisCardToggle.isSelected)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the test enforces this (it checks if the card is saved!) but I can

Comment on lines 63 to +64
case .automatic:
// only enable the save checkbox by default for US
return Locale.current.stp_regionCode == "US"
return false
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should probably add this to our list of "things to break" in the next major version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like having .automatic around just in case, maybe someday we can control it server-side

@davidme-stripe davidme-stripe enabled auto-merge (squash) June 5, 2024 23:12
@davidme-stripe davidme-stripe merged commit 2dc6c9b into master Jun 5, 2024
4 checks passed
@davidme-stripe davidme-stripe deleted the davidme/dont-save-card branch June 5, 2024 23:41
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