woocommerce-ios
woocommerce-ios copied to clipboard
[Woo POS - payments onboarding] Enable POS for stores with incomplete payments onboarding
Closes: #14147
Why
As in the project kickoff pdfdoF-5Bo-p2, I'm starting the project by adding a feature flag and enabling POS for stores with incomplete payments onboarding state behind the feature flag. I decided to add a feature flag so that it doesn't break the Installable Builds (used for Woo DM demo, if some people on the team try updating the app version) and the work is minimal.
How
- A feature flag was added
paymentsOnboardingInPointOfSale, this will be removed when the project is completed - In
POSEligibilityChecker, the onboarding completed state condition is removed when the onboardingfeature flag is enabled - A test case was added for the
POSEligibilityCheckerchanges
There are also two small commits at the beginning where I removed unused properties while I was looking into the code. Unused code could be confusing during code search and removing it would reduce the time spent searching for its usage.
Steps to reproduce
Stores with onboarding completed
Prerequisite: the store is eligible for POS (US store, USD, WC v6.6+), and payments onboarding is completed (in Menu > Payments, no Continue setup banner is shown at the bottom)
- Launch app
- Go to Menu -->
Point of Sale Moderow should appear as before - Tap on
Point of Sale Mode - Tap
Connect your reader--> connection flow should work as before
Stores with incomplete onboarding
Prerequisite: the store is eligible for POS (US store, USD, WC v6.6+), but payments onboarding is not completed (in Menu > Payments, Continue setup banner is shown at the bottom, or not using Woo Payments)
- Launch app
- Go to Menu -->
Point of Sale Moderow should appear (it shouldn't appear when the feature flag is off) - Tap on
Point of Sale Mode - Tap
Connect your reader--> no-op for now, onboarding UI will be integrated in https://github.com/woocommerce/woocommerce-ios/issues/14148
Testing information
I tested on iPad Pro 11in (M4) iOS 17.5 simulator with Xcode 16.
- [x] @jaclync tests when the feature flag is off, POS remains hidden for stores without completed onboarding
Screenshots
https://github.com/user-attachments/assets/48bcaeaa-3976-4697-bdc4-2dcfd11581a6
- [x] I have considered if this change warrants user-facing release notes and have added them to
RELEASE-NOTES.txtif necessary.
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:
- [x] 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.
- [x] Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
- [x] 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 all devices (phone/tablet) and no regressions are added.
📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.
| App Name | ||
| Build Number | pr14149-06f31aa | |
| Version | 20.7 | |
| Bundle ID | com.automattic.alpha.woocommerce | |
| Commit | 06f31aa81abcaf8ea1dc326114662d15f34ac36a | |
| App Center Build | WooCommerce - Prototype Builds #11183 |