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

MBL-1556: Add network calls to confirm address and requery the PPO card list #2088

Merged
merged 24 commits into from
Aug 6, 2024

Conversation

leighdouglas
Copy link
Contributor

@leighdouglas leighdouglas commented Aug 1, 2024

📲 What

  • Requery ppo list when confirm address call is successful
  • switch to schema.graphql and remove schema.json, including the small changes needed with the switch
  • Cleanup activity result call back for fix payment and confirm address
  • Remove categories from ppo query response, deprecated

🤔 Why

ppo!

🛠 How

  • Will be using schema.graph moving forward
  • Confirm address dialog box, tapping confirm sends a mutation request to CreateOrUpdateBackingAddress, if that is successful, it then refreshes the ppo list by sending a new query request to PledgedProjectsOverview. otherwise we show an error

👀 See

Please note -> the "requery" does not dismiss the card because we are using mocked/hardcoded data for example purposes.

Success:

happypath-confirm-address-requery.mp4

Error:

unhappypath-confirm-address-requery-error.mp4

📋 QA

Please note -> the requery occurs but does not dismiss the card because we are using mocked/hardcoded data for example and testing purposes.

Happy path:

  1. Find a backingID and addressID associated with your account. i used graphiql to find mine
  2. In PPOCardFactory.kt, in the confirmAddressCard() function, replace the addressID and backingID values with the ones associate with your account
  3. In GraphqlTransformers, add a confirm address card to the list, generated by the PPOCardFactory.confirmAddressCard() function
  4. Run app
  5. Navigate to ppo screen. Find confirm address card, tap confirm. Dialog popup should appear
  6. In dialog box, tap confirm. Should see loading spinner and success snackbar at the bottom of screen
  7. Confirm in logs or app inspection that two calls were made successfully, one to CreateOrUpdateBackingAddress, which returns true, and one to PledgedProjectsOverview

Unhappy path/errors:

  1. Make sure the addressID and the backingID values in the POCardFactory.confirmAddressCard() function are both not real ids, can be a random string of characters
  2. In GraphqlTransformers, add a confirm address card to the list, generated by the PPOCardFactory.confirmAddressCard() function
  3. Run app
  4. Navigate to ppo screen. Find confirm address card, tap confirm. Dialog popup should appear
  5. In dialog box, tap confirm. Should see loading spinner and error snackbar at the bottom of screen
  6. Confirm in logs or app inspection that only one calls was made to CreateOrUpdateBackingAddress with a response of false

Story 📖

MBL-1556: Add network calls to confirm address and requery the PPO card list

@leighdouglas leighdouglas changed the title Leigh/mbl 1556 ca requery MBL-1556: Add network calls to confirm address and requery the PPO card list Aug 1, 2024
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 62.96296% with 20 lines in your changes missing coverage. Please review.

Project coverage is 67.65%. Comparing base (2d6291c) to head (8342b8f).

Files Patch % Lines
...arter/services/transformers/GraphQLTransformers.kt 0.00% 10 Missing ⚠️
...res/pledgedprojectsoverview/data/PledgeTierType.kt 0.00% 5 Missing ⚠️
...r/features/pledgedprojectsoverview/data/PPOCard.kt 57.14% 3 Missing ⚠️
...res/pledgedprojectsoverview/data/PPOCardFactory.kt 66.66% 1 Missing ⚠️
...view/viewmodel/PledgedProjectsOverviewViewModel.kt 96.15% 0 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2088      +/-   ##
============================================
+ Coverage     67.49%   67.65%   +0.15%     
- Complexity     2126     2127       +1     
============================================
  Files           363      363              
  Lines         22105    22100       -5     
  Branches       3104     3106       +2     
============================================
+ Hits          14920    14951      +31     
+ Misses         5544     5506      -38     
- Partials       1641     1643       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leighdouglas leighdouglas marked this pull request as ready for review August 1, 2024 21:34
@leighdouglas leighdouglas self-assigned this Aug 1, 2024
@@ -78,8 +78,8 @@ mutation CompleteOnSessionCheckout($checkoutId: ID!, $paymentIntentClientSecret:
}
}

mutation completeOrder($projectId: ID! $stripePaymentMethodId: String, $paymentSourceId: String, $paymentSourceReusable: Boolean, $paymentMethodTypes: [String!]) {
completeOrder(input:{ projectId: $projectId, stripePaymentMethodId: $stripePaymentMethodId, paymentSourceId: $paymentSourceId, paymentSourceReusable: $paymentSourceReusable, paymentMethodTypes: $paymentMethodTypes }) {
Copy link
Contributor Author

@leighdouglas leighdouglas Aug 5, 2024

Choose a reason for hiding this comment

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

@Arkariang @mtgriego im a bit nervous about this change. this change was required after i downloaded the new graphql schema.

Copy link
Contributor

Choose a reason for hiding this comment

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

This would affect the feature branch, but if changes are needed there we can add it back in before merging to master, though to be safe lets hold the merge until we can confirm with Isa tomorrow

@leighdouglas leighdouglas merged commit 07cc7e4 into master Aug 6, 2024
3 checks passed
@leighdouglas leighdouglas deleted the leigh/mbl-1556-ca-requery branch August 6, 2024 16:37
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.

4 participants