-
Notifications
You must be signed in to change notification settings - Fork 0
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
[#8] [UI] As a user, if I fail to log in, I see an error popup #55
Conversation
c0be120
to
6515054
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #55 +/- ##
===========================================
- Coverage 52.47% 47.20% -5.28%
===========================================
Files 11 14 +3
Lines 101 125 +24
===========================================
+ Hits 53 59 +6
- Misses 48 66 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
6b4275d
to
5fa7ea2
Compare
5fa7ea2
to
c8d6ea4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
final isConnected = await internetConnectionManager.hasConnection(); | ||
|
||
if (!isConnected) { | ||
state = const AsyncError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I ask if we need to write unit tests for these to increase the code coverage? as the Codevov just got failed 🙏
https://github.com/nimblehq/flutter-ic-khanh-thieu/pull/55/checks?check_run_id=15928008166
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this too. However, the login()
method is not integrated with API yet. I think we can supplement unit tests for LoginViewModel
in the integrating task 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better if the unit test should be written on the integration task
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replied here 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go 🏃♂️
What happened 👀
Show the Alert dialog with an appropriate message when fail to log in.
LoginForm
:TextEditingController
s to keep track of inputs._submit()
.LoginViewModel
:loginViewModelProvider
fromNotifierProvider
toAsyncNotifierProvider
.internet_connection_manager
library for checking Internet connection, created a wrapper namedInternetConnectionManager
.login()
.showAlertDialog()
to show a native alert dialog for iOS and Android.Insight 📝
riverpod
will be used for dependency injection (besides state management), so there's no need to use a separate library (i.e.,get_it
).Proof Of Work 📹
Un-authorized error
un-authorized-ios.mp4
un-authorized-android.webm
No Internet connection error
no-internet-ios.mp4
no-internet-android.webm