Issue/13326 scan full screen loading & error handling#13920
Issue/13326 scan full screen loading & error handling#13920malinajirka merged 11 commits intodevelopfrom
Conversation
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
|
You can test the changes on this Pull Request by downloading the APK here. |
malinajirka
left a comment
There was a problem hiding this comment.
Thanks @ashiagr! Great job ;). It looks good overall, I've left one blocking comment ("translatable=false") and a few nitpicks.
🔍 Nitpick: When I click on "retry" when my internet connection is still disabled, there is no loading indicator -> it seems like the button doesn't work. We usually add "500ms" delay in such scenarios so the loading is displayed for a bit.
WordPress/src/main/java/org/wordpress/android/ui/jetpack/scan/ScanViewModel.kt
Outdated
Show resolved
Hide resolved
WordPress/src/test/java/org/wordpress/android/ui/jetpack/scan/ScanViewModelTest.kt
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/jetpack/scan/ScanFragment.kt
Show resolved
Hide resolved
|
Thanks for the review @malinajirka! I've addressed your comments and answered questions.
Added retry delay in d9ea5d2. Ready for another round. |
Parent #13326
This PR displays full screen loading and errors on fetch scan and start scan requests.
Full screen loading/ errors
Snack bars
To test
Loading (0), No Network (1)
No network snackbar (5)
Generic Request Failed (3), Start Scan Request Failed (4), Generic Request Failed snackbar (6)
These states can be tested by using
ScanViewModeltests:Generic Request Failed (3)
given fetch scan fails, when scan state fetched over empty scan state, then request failed ui state showngiven request failed error ui state, when contact support is clicked, then contact support screen is shownStart Scan Request Failed (4)
given scan start request fails, when scan button is clicked, then request failed state is showngiven start scan request failed error state, when contact support is clicked, then contact support shownGeneric Request Failed snackbar (6)
given fetch scan state fails, when scan state fetched over last scan state, then request failed msg shownNotes:
PR submission checklist:
RELEASE-NOTES.txtif necessary.