woocommerce / woocommerce-android

WooCommerce Android app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
277 stars 135 forks source link

[Woo POS][Non Simple Products] Checkout variations #12927

Open AnirudhBhat opened 1 week ago

AnirudhBhat commented 1 week ago

Closes: #12925

Description

This PR supports check out of the variations successfully. With this PR, you should be able to select, add, and then checkout variations successfully on POS mode.

Testing information

Try selecting different variations, add those to the cart, and then proceed to checkout and complete the transaction. It should finish successfully and you should be able to see all the products correctly in the order detail screen.

The tests that have been performed

Checkout successfully

  1. Navigate to the POS mode (more menu -> POS)
  2. Select any variable product from the items list
  3. Ensure you navigate to the variations list screen
  4. Select any variations
  5. Ensure those gets added to the cart
  6. Proceed to checkout
  7. Ensure the transaction completes successfully

Correct product details in Order details screen

  1. Navigate to the POS mode (more menu -> POS)
  2. Select any variable product from the items list
  3. Ensure you navigate to the variations list screen
  4. Select any variations
  5. Ensure those gets added to the cart
  6. Proceed to checkout
  7. Ensure the transaction completes successfully
  8. Exit POS and come back to the orders tab
  9. Select the order that just got created
  10. Ensure you see all the products (variations) you added there and are correct

Images/gif

https://github.com/user-attachments/assets/a4314047-ac5b-4f76-ba19-c673dba22041

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

wpmobilebot commented 1 week ago
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit679b6a1872a6343f71dbcbbb3daea32cb12f3958
Direct Downloadwoocommerce-wear-prototype-build-pr12927-679b6a1.apk
wpmobilebot commented 1 week ago

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit679b6a1872a6343f71dbcbbb3daea32cb12f3958
Direct Downloadwoocommerce-prototype-build-pr12927-679b6a1.apk
codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 69.07216% with 30 lines in your changes missing coverage. Please review.

Project coverage is 39.61%. Comparing base (dc04809) to head (6e70393).

Files with missing lines Patch % Lines
...id/ui/woopos/home/totals/WooPosTotalsRepository.kt 58.49% 17 Missing and 5 partials :warning:
...android/ui/woopos/home/cart/WooPosCartViewModel.kt 78.26% 3 Missing and 2 partials :warning:
...rce/android/ui/woopos/home/cart/WooPosCartState.kt 75.00% 2 Missing :warning:
...oid/ui/woopos/home/totals/WooPosTotalsViewModel.kt 80.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## issue/12845-add-variation-to-cart #12927 +/- ## ==================================================================== Coverage 39.60% 39.61% - Complexity 5961 5969 +8 ==================================================================== Files 1268 1268 Lines 73215 73270 +55 Branches 10050 10055 +5 ==================================================================== + Hits 29000 29027 +27 - Misses 41635 41659 +24 - Partials 2580 2584 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

wpmobilebot commented 2 days ago

Version 21.2 has now entered code-freeze, so the milestone of this PR has been updated to 21.3.