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
Add credit card implementation #503
Merged
cdolm92
merged 25 commits into
feature-payment-methods
from
add-credit-card-implementation
Dec 4, 2018
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
e3cd226
Email undeliverable/unverified (#478)
ifbarrera e9a1005
Use correct function to log events in crash logs (#481)
justinswart 44ff603
Merge remote-tracking branch 'oss/feature-payment-methods' into add-c…
cdolm92 cc49f7c
changed ui colors for textfield text and font size of text label
cdolm92 01083af
vm and work on enabling save
cdolm92 1859e8c
wip- get stripe token
cdolm92 6f9dd6f
wip- payment source mutation
cdolm92 b066666
wip- keyboard response
cdolm92 8e98ec6
wip- getting a stripe error here
cdolm92 3237915
wip- error fix w/ publishable key, error banner showing
cdolm92 06cafc2
wip- saving with error and keyboard functionality
cdolm92 654102a
wip- updating card immediately
cdolm92 98d07de
wip
cdolm92 a6144aa
Merge remote-tracking branch 'oss/feature-payment-methods' into add-c…
cdolm92 fb3b702
wip - ACs met
cdolm92 0a221f0
wip - refactor in view model, made IDs testable, begane VM tests
cdolm92 aff4384
wip -refactor on vm/vmtest
cdolm92 56a0df0
wip -refactor deleted comments on vmt
cdolm92 1759300
wip -snapshot tests
cdolm92 a1dbe87
swiftlint fixes
cdolm92 40ecf69
renaming/refactor, corrected paymentmethodstests
cdolm92 84a4253
pr feedback
cdolm92 8883d58
swiftlint fixes
cdolm92 66030fd
changed function name
cdolm92 9cd3977
indentation
cdolm92 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,8 +119,8 @@ internal final class AddNewCardViewModelTests: TestCase { | |
func testBecomeFirstResponderAndSaveEnabled() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this test could be broken up in 2 pieces: one for |
||
self.cardholderNameBecomeFirstResponder.assertDidNotEmitValue() | ||
self.paymentDetailsBecomeFirstResponder.assertDidNotEmitValue() | ||
self.saveButtonIsEnabled.assertDidNotEmitValue() | ||
self.activityIndicatorShouldShow.assertDidNotEmitValue() | ||
self.saveButtonIsEnabled.assertDidNotEmitValue() | ||
|
||
self.vm.inputs.viewDidLoad() | ||
|
||
|
@@ -149,7 +149,21 @@ internal final class AddNewCardViewModelTests: TestCase { | |
self.saveButtonIsEnabled.assertValues([false, false, true], "Enabled when form is valid.") | ||
} | ||
|
||
func testSetPublishableKey_CardInfoInValid() { | ||
func testSaveButtonEnabled() { | ||
self.saveButtonIsEnabled.assertDidNotEmitValue() | ||
self.vm.inputs.viewDidLoad() | ||
|
||
self.vm.inputs.cardholderNameChanged("") | ||
self.vm.inputs.paymentInfo(valid: false) | ||
self.saveButtonIsEnabled.assertValues([false], "Disabled form is incomplete") | ||
|
||
self.vm.inputs.cardholderNameChanged("Native Squad") | ||
self.vm.inputs.paymentInfo(valid: true) | ||
|
||
self.saveButtonIsEnabled.assertValues([false, false, true], "Enabled when form is valid.") | ||
} | ||
|
||
func testSetPublishableKey_CardInfoInvalid() { | ||
withEnvironment(config: .template |> Config.lens.stripePublishableKey .~ "stripePublishableKey") { | ||
self.vm.inputs.viewDidLoad() | ||
|
||
|
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.
Alignment is off here