Skip to content

Conversation

@samiuelson
Copy link
Contributor

@samiuelson samiuelson commented Jan 10, 2025

Closes: #13264

Description

This PR slightly changes the texts shown in the payment flow in POS.

The hardcoded "Remove card" hint has now been deleted in this PR in favor of relying on dynamic hints that come from Terminal SDK. This improves the experience in case the reader asks to insert card inside the reader or to enter PIN – the hardcoded "Remove card" hint turned out to be misleading when testing a UK-based store.

Steps to reproduce

  1. Switch to UK-based store
  2. Open POS (either by overriding conditions in WooPosIsEnabled or running WooPosActivity directly in AS)
  3. Add to cart a product with price having decimals equal to .02 to emulate offline_pin_required terminal error.
  4. Notice that POS shows text "Remove card", while reader asks to insert the card to the reader (confusing!)

Testing information

POS should not show hardcoded hints for payment states, rather the ones that come from payment state's readerHint property.

The tests that have been performed

I tested the card payment flow in POS for the UK-based store, for a total of 3.02 GBP. I verified that in case reader asks to insert the card, the "Please wait..." message is shown instead of "Remove card".

Samsung Tab S9, Android 14

Images/gif

  • 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.

…ed-with-please-wait-in-case-of-002-gbp-error
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 10, 2025

📲 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
Commit375bde5
Direct Downloadwoocommerce-wear-prototype-build-pr13283-375bde5.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 10, 2025

📲 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
Commit375bde5
Direct Downloadwoocommerce-prototype-build-pr13283-375bde5.apk

…ed-with-please-wait-in-case-of-002-gbp-error
@samiuelson samiuelson marked this pull request as ready for review January 10, 2025 16:32
@samiuelson samiuelson requested a review from kidinov January 10, 2025 16:32
…ed-with-please-wait-in-case-of-002-gbp-error
@kidinov kidinov self-assigned this Jan 13, 2025
Copy link
Contributor

@kidinov kidinov left a comment

Choose a reason for hiding this comment

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

There is a broken test, but other than that LGTM!

I noticed though that the processing screen UI feels a bit off. Those ... creates a filling that the texts are not centrally aligned. Also, not sure maybe the margin between texts a bit too big, as on the successful payment screen it clearly smaller and bold and bigger text actually is on the top, not bottom

image image

@samiuelson samiuelson enabled auto-merge January 14, 2025 11:03
@samiuelson samiuelson merged commit 069f146 into trunk Jan 14, 2025
14 of 15 checks passed
@samiuelson samiuelson deleted the 13264-pos-remove-card-text-should-be-replaced-with-please-wait-in-case-of-002-gbp-error branch January 14, 2025 11:34
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 41.10%. Comparing base (7479676) to head (375bde5).
Report is 10 commits behind head on trunk.

Files with missing lines Patch % Lines
...oid/ui/woopos/home/totals/WooPosTotalsViewModel.kt 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #13283      +/-   ##
============================================
- Coverage     41.10%   41.10%   -0.01%     
  Complexity     6421     6421              
============================================
  Files          1321     1321              
  Lines         77179    77177       -2     
  Branches      10643    10643              
============================================
- Hits          31724    31722       -2     
  Misses        42646    42646              
  Partials       2809     2809              

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[POS] "Remove card" text should be replaced with "Please wait..." in case of 0.02 GBP error

5 participants