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

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

Merged
merged 22 commits into from
Nov 26, 2024

Conversation

AnirudhBhat
Copy link
Contributor

@AnirudhBhat AnirudhBhat commented Nov 15, 2024

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

checkout_variations.mp4
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

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:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@AnirudhBhat AnirudhBhat added type: task An internally driven task. feature: point of sale POS project labels Nov 15, 2024
@AnirudhBhat AnirudhBhat added this to the 21.2 milestone Nov 15, 2024
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 15, 2024

📲 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
Commitf498981
Direct Downloadwoocommerce-wear-prototype-build-pr12927-f498981.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 15, 2024

📲 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
Commitf498981
Direct Downloadwoocommerce-prototype-build-pr12927-f498981.apk

…e/12925-checkout-variations

# Conflicts:
#	WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/cart/WooPosCartViewModel.kt
@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2024

Codecov Report

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

Project coverage is 39.76%. Comparing base (6311891) to head (f498981).
Report is 23 commits behind head on trunk.

Files with missing lines Patch % Lines
...id/ui/woopos/home/totals/WooPosTotalsRepository.kt 58.49% 17 Missing and 5 partials ⚠️
...android/ui/woopos/home/cart/WooPosCartViewModel.kt 78.26% 3 Missing and 2 partials ⚠️
...rce/android/ui/woopos/home/cart/WooPosCartState.kt 75.00% 2 Missing ⚠️
...oid/ui/woopos/home/totals/WooPosTotalsViewModel.kt 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##              trunk   #12927   +/-   ##
=========================================
  Coverage     39.75%   39.76%           
- Complexity     5992     6000    +8     
=========================================
  Files          1268     1268           
  Lines         73262    73317   +55     
  Branches      10046    10051    +5     
=========================================
+ Hits          29124    29153   +29     
- Misses        41571    41593   +22     
- Partials       2567     2571    +4     

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

@AnirudhBhat AnirudhBhat marked this pull request as ready for review November 18, 2024 04:14
@wpmobilebot wpmobilebot removed this from the 21.2 milestone Nov 22, 2024
@wpmobilebot wpmobilebot added this to the 21.3 milestone Nov 22, 2024
@wpmobilebot
Copy link
Collaborator

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

Base automatically changed from issue/12845-add-variation-to-cart to trunk November 22, 2024 10:19
@samiuelson samiuelson self-assigned this Nov 26, 2024
Copy link
Collaborator

@samiuelson samiuelson left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@samiuelson samiuelson merged commit 665ee7c into trunk Nov 26, 2024
15 checks passed
@samiuelson samiuelson deleted the issue/12925-checkout-variations branch November 26, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: point of sale POS project type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Woo POS][Non-Simple Products] Use variations for completing transactions successfully
4 participants