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

States support in edit origin address screen #13426

Open
wants to merge 7 commits into
base: trunk
Choose a base branch
from

Conversation

atorresveiga
Copy link
Contributor

@atorresveiga atorresveiga commented Jan 31, 2025

Part of: #12439

Description

This PR adds support for state selection in the edit origin address screen and the loading state while countries and states are fetched.

Testing information

TC1

  1. Open the orders tab
  2. Tap on an order eligible for shipping label creation
  3. Expand the shipment details section
  4. Expand on the origin address selection (3 dots)
  5. Tap on the pencil
  6. Select a country with states in the API response (ex. USA)
  7. Tap on states
  8. Check that the app navigates to the state selection screen
  9. Select a state
  10. Check that the state is updated in the edit origin address screen

TC2

  1. Open the orders tab
  2. Tap on an order eligible for shipping label creation
  3. Expand the shipment details section
  4. Expand on the origin address selection (3 dots)
  5. Tap on the pencil
  6. Select a country without states in the API response (ex. Puerto Rico)
  7. Check that an input field is displayed in the state section
  8. Type in the state input field and check that the value change
  9. Check the input keyboard navigation works as expected

The tests that have been performed

  • The keyboard navigation functions properly when the state field is a dropdown or an input control.
  • dropdown or an input control used depending on the states list result

Images/gif

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

@atorresveiga atorresveiga added type: task An internally driven task. feature: shipping labels Related to creating, ordering, or printing shipping labels. labels Jan 31, 2025
@atorresveiga atorresveiga added this to the 21.6 milestone Jan 31, 2025
@atorresveiga atorresveiga requested a review from ThomazFB January 31, 2025 01:16
@dangermattic
Copy link
Collaborator

dangermattic commented Jan 31, 2025

2 Warnings
⚠️ Class LocationState is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ This PR is assigned to the milestone 21.6. 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 🚫 Danger

@wpmobilebot
Copy link
Collaborator

📲 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
Commit080e650
Direct Downloadwoocommerce-wear-prototype-build-pr13426-080e650.apk

@wpmobilebot
Copy link
Collaborator

📲 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
Commit080e650
Direct Downloadwoocommerce-prototype-build-pr13426-080e650.apk

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 59.49367% with 32 lines in your changes missing coverage. Please review.

Project coverage is 41.27%. Comparing base (6288b27) to head (080e650).

Files with missing lines Patch % Lines
...s/address/origin/WooShippingEditOriginViewModel.kt 58.10% 22 Missing and 9 partials ⚠️
...ooshippinglabels/address/GetStatesByCountryCode.kt 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##              trunk   #13426   +/-   ##
=========================================
  Coverage     41.26%   41.27%           
- Complexity     6551     6555    +4     
=========================================
  Files          1328     1329    +1     
  Lines         77765    77814   +49     
  Branches      10709    10720   +11     
=========================================
+ Hits          32089    32116   +27     
- Misses        42830    42845   +15     
- Partials       2846     2853    +7     

☔ 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
feature: shipping labels Related to creating, ordering, or printing shipping labels. type: task An internally driven task. unit-tests-exemption
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants