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

[NT-315] Fix Errored Pledge Feature #1190

Merged
merged 40 commits into from
Jun 5, 2020
Merged

Conversation

justinswart
Copy link
Contributor

@justinswart justinswart commented May 11, 2020

📲 What

Feature branch for the work related to Fixing Errored Pledges containing the following merged PRs:

#982
#993
#991
#1027
#1104
#1128
#1141
#1140
#1193
#1203
#1206
#1212

Isabel Barrera and others added 30 commits December 10, 2019 09:59
)

* Fix button on errored pledges

* Tests

* Formatting

* Screenshot tests

* Rerecording tests

* formatting
)

* Fix button on errored pledges

* Tests

* Formatting

* Screenshot tests

* Rerecording tests

* formatting
* fix image shown

* commit adds fixIconHidden output and tests this output. Also corrects some tests

* fix test

* snapshot

* renames erroredPledge to isErrored

* swift format

* fixes tests errors

* Revert "fixes tests errors"

This reverts commit 32cea0f.

* uses isErrored

* pr feedback
* fix image shown

* commit adds fixIconHidden output and tests this output. Also corrects some tests

* fix test

* snapshot

* renames erroredPledge to isErrored

* swift format

* fixes tests errors

* Revert "fixes tests errors"

This reverts commit 32cea0f.

* uses isErrored

* navigating to fix screen

* testing gotofixpledge output

* corrected merge and removed unused constant

* fix payment method copy

* testing pledgeContext

* seift format

* wip

* wip

* pr feedback

* swift format

* pr feedback

* swiftformat
* should fix feature branch

* Update Library/ViewModels/PledgeViewModel.swift

pr feedback

Co-Authored-By: jgsamudio <jonathan2457@gmail.com>

* swift format

* Revert "swift format"

This reverts commit 89b6a0d.

* swift format

* Revert "swift format"

This reverts commit eb9261b.

* swift format

Co-authored-by: jgsamudio <jonathan2457@gmail.com>
* whitelisted tracking events

* swift format

* fix test

* pr feedback
* wip - collection date feature complete

* tests passing

* swift format

* wip- refactor

* fix tests

* snapshots

* updated copy

* swift format

* pr feedback

* cache formatter

* swift format
…1174)

* Fetch Backing for ManagePledgeViewController from GraphQL

* Correct test names, use rawValue in GraphSchema

* Remove Argo import

* Put GraphBackingEnvelope back

* Fix snapshot tests

* Record snapshots from commandline

* [NT-1185] Configure CancePledgeViewController with GraphQL Backing (#1176)

* Configure CancePledge with GraphQL backing

* Update tests

* Fix merge error

* Record snapshots from commandline
# Conflicts:
#	Kickstarter-iOS/Views/Cells/PledgeCreditCardView.swift
#	Library/ViewModels/PledgeCreditCardViewModel.swift
#	Library/ViewModels/PledgeCreditCardViewModelTests.swift
#	Library/ViewModels/PledgePaymentMethodsViewModel.swift
#	Library/ViewModels/PledgeViewModel.swift
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsFalse_lang_de_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsFalse_lang_de_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsFalse_lang_en_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsFalse_lang_en_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsFalse_lang_es_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsFalse_lang_es_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsFalse_lang_fr_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsFalse_lang_fr_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsFalse_lang_ja_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsFalse_lang_ja_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsTrue_lang_de_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsTrue_lang_de_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsTrue_lang_en_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsTrue_lang_en_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsTrue_lang_es_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsTrue_lang_es_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsTrue_lang_fr_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsTrue_lang_fr_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsTrue_lang_ja_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_NeedsConversion_IsTrue_lang_ja_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_de_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_de_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_de_device_phone4inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_de_device_phone5_5inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_de_device_phone5_8inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_en_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_en_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_en_device_phone4inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_en_device_phone5_5inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_en_device_phone5_8inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_es_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_es_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_es_device_phone4inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_es_device_phone5_5inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_es_device_phone5_8inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_fr_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_fr_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_fr_device_phone4inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_fr_device_phone5_5inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_fr_device_phone5_8inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_ja_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_ja_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_ja_device_phone4inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_ja_device_phone5_5inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_ChangePaymentMethodContext_UnavailableStoredCards_lang_ja_device_phone5_8inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_de_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_de_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_en_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_en_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_es_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_es_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_fr_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_fr_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_ja_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_ja_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_de_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_de_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_en_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_en_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_es_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_es_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_fr_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_fr_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_ja_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_ja_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_de_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_de_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_de_device_phone4inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_de_device_phone5_5inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_de_device_phone5_8inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_en_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_en_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_en_device_phone4inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_en_device_phone5_5inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_en_device_phone5_8inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_es_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_es_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_es_device_phone4inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_es_device_phone5_5inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_es_device_phone5_8inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_fr_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_fr_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_fr_device_phone4inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_fr_device_phone5_5inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_fr_device_phone5_8inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_ja_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_ja_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_ja_device_phone4inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_ja_device_phone5_5inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_UnavailableStoredCards_lang_ja_device_phone5_8inch@2x.png
… GraphQL Backing (#1188)

* Configure ManagePledgeSummaryView with GraphQL Backing

* Fix snapshot tests

* Fix tests

* Make reward optional

* Refactor, ensure all sub-vc's don't depend on Project directly

* Move test

* Put test back

* Remove coalesce

* Alphabetize

* Tuples -> Structs

* Convert to double during deserialization

* Fix tests

* Remove recordMode

* [NT-633] Errored Pledge Deeplink (#1178)

* Errored pledge deeplink

* RefTag tests

* Revert debug code

* Use correct navigation controller

* Present login modal when logged out during errored pledge deeplink

* Present login modal when logged out

* Update visibility modifiers

* Fix failing test
@nativeksr
Copy link
Collaborator

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

* Add errored pledges to badge count and refresh user on fix pledge

* Fix test, updating backings on user update

* Ensure errored backing are cleared, shipping amount is shown in summary

* Add test
* Add retry payment method behaviour

* ManagePledgeView loading state

* Don't un-hide rootStackView if backing fails to load

* Don't hide apple pay button in fix context

* Show apple pay button when changing payment method

* Test commit - will revert

* Revert "Test commit - will revert"

This reverts commit 5e196f0.
# Conflicts:
#	Library/Tracking/Koala.swift
#	Library/ViewModels/PledgeViewCTAContainerViewModel.swift
#	Library/ViewModels/PledgeViewCTAContainerViewModelTests.swift
#	Library/ViewModels/PledgeViewModel.swift
* Add retry payment method behaviour

* ManagePledgeView loading state

* Don't un-hide rootStackView if backing fails to load

* Don't hide apple pay button in fix context

* Add pull-to-refresh on error

* Fix layout

* Fix merge error

* Hide rightBarButtonItem when view is errored

* ignoreValues instead
* Add retry payment method behaviour

* ManagePledgeView loading state

* Don't un-hide rootStackView if backing fails to load

* Don't hide apple pay button in fix context

* Add pull-to-refresh on error

* Fix layout

* Fix merge error

* Hide rightBarButtonItem when view is errored

* ignoreValues instead

* Refactor to instantiate ManagePledgeViewModel with params only

* Fix ManagePledgeViewBackingEnvelopeTests

* Fix tests

* Fix tests

* Consolidate shared functions, prefer filterMap

* Fix presentation crash, only show payment method section if a credit card was deserialized

* Allow optional backing param

* Remove logEvents
@justinswart justinswart requested a review from ifbarrera June 4, 2020 21:16
@justinswart justinswart marked this pull request as ready for review June 4, 2020 21:16
@justinswart justinswart merged commit 38f452a into master Jun 5, 2020
@justinswart justinswart deleted the feature-errored-pledges branch June 5, 2020 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants