woocommerce-android
woocommerce-android copied to clipboard
[WOO POS] UI tests for Simple products banner in Products screen
Closes: #12377
Description
This PR:
- Sets up mock API responses required for successfully writing UI tests for POS screens
- Adds UI tests for Simple products only banner in Products screen
Testing information
Ensure the CI is happy - specifically, UI test pipeline is green.
The tests that have been performed
- UI test to verify Simple products only banner is displayed
- UI test to verify Simple products only banner's title and message are correctly displayed
- UI test to verify Simple products only banner opens Product info dialog when clicked on learn more
- UI test to verify Simple products only banner is dismissed when closed
Images/gif
https://github.com/user-attachments/assets/2a51efd4-b63b-4324-b70d-b20840ece5f5
- [x] I have considered if this change warrants release notes and have added them to
RELEASE-NOTES.txtif 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.
| 1 Message | |
|---|---|
| :book: | This PR is still a Draft: some checks will be skipped. |
Generated by :no_entry_sign: Danger
📲 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 | |
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Commit | cd1d8a6e41b1d283ab591c903fe6bbf19814c23c | |
| Direct Download | woocommerce-wear-prototype-build-pr12428-cd1d8a6.apk |
📲 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 | |
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Commit | cd1d8a6e41b1d283ab591c903fe6bbf19814c23c | |
| Direct Download | woocommerce-prototype-build-pr12428-cd1d8a6.apk |
Codecov Report
Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
Project coverage is 40.64%. Comparing base (
c79075c) to head (d064a29).
| Files | Patch % | Lines |
|---|---|---|
| ...ocommerce/android/ui/moremenu/MoreMenuViewModel.kt | 0.00% | 1 Missing :warning: |
| ...ce/android/ui/woopos/home/products/WooPosBanner.kt | 0.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## trunk #12428 +/- ##
============================================
- Coverage 40.64% 40.64% -0.01%
Complexity 5602 5602
============================================
Files 1214 1214
Lines 68105 68106 +1
Branches 9358 9358
============================================
Hits 27683 27683
- Misses 37885 37886 +1
Partials 2537 2537
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks for working on this, I'm closing the PR due to inactivity.