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] Add variation to cart #12926

Open AnirudhBhat opened 6 days ago

AnirudhBhat commented 6 days ago

Closes: #12845

Description

This PR adds variation to the cart when clicked from the variations list screen.

Testing information

Try adding different variations of a variable product to the cart and ensure they all get added to the cart with correct name and variation attribute.

The tests that have been performed

Adding different variations to the cart in both dark and light mode.

  1. Navigate to the POS mode (more menu -> POS)
  2. Select any variable product
  3. Ensure you navigate to the variations list screen
  4. Click on any variation
  5. Ensure that variation gets added to the cart

Images/gif

https://github.com/user-attachments/assets/847c670c-8e43-46a7-afa5-01411e72fa75

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 6 days 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
Commit1524205ca4a794c63f000c0eaac848cca781ce77
Direct Downloadwoocommerce-wear-prototype-build-pr12926-1524205.apk
wpmobilebot commented 6 days 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
Commit1524205ca4a794c63f000c0eaac848cca781ce77
Direct Downloadwoocommerce-prototype-build-pr12926-1524205.apk
codecov-commenter commented 6 days ago

Codecov Report

Attention: Patch coverage is 74.28571% with 18 lines in your changes missing coverage. Please review.

Project coverage is 39.61%. Comparing base (4e26906) to head (1524205). Report is 149 commits behind head on trunk.

Files with missing lines Patch % Lines
...android/ui/woopos/home/cart/WooPosCartViewModel.kt 72.72% 8 Missing and 4 partials :warning:
...id/ui/woopos/common/data/WooPosGetVariationById.kt 0.00% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## trunk #12926 +/- ## ============================================ + Coverage 39.59% 39.61% +0.02% - Complexity 5956 5965 +9 ============================================ Files 1267 1268 +1 Lines 73179 73215 +36 Branches 10048 10051 +3 ============================================ + Hits 28976 29006 +30 - Misses 41629 41634 +5 - Partials 2574 2575 +1 ```

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


🚨 Try these New Features:

dangermattic commented 16 hours ago
1 Warning
:warning: This PR is assigned to the milestone 21.2. This milestone is due in less than 2 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by :no_entry_sign: Danger