-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Nearby tab accessible without GPS #4771
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4771 +/- ##
============================================
- Coverage 42.17% 42.15% -0.03%
+ Complexity 1888 1886 -2
============================================
Files 364 364
Lines 15735 15783 +48
Branches 1361 1367 +6
============================================
+ Hits 6637 6654 +17
- Misses 8610 8637 +27
- Partials 488 492 +4
Continue to review full report at Codecov.
|
@Ayan-10 could you add tests for the new lines? Also please rebase to the latest master, we have updated the CI for faster builds |
@madhurgupta10 There is no test class for NearbyParentFragment in the code. So I created the test class and added tests for newly added lines in this PR. |
|
||
@Test | ||
@Throws(Exception::class) | ||
fun `Start map without gps test when last location known`() { |
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.
@Ayan-10 can you also add mock verification for all mocked objects to both of your tests, for example
verify(mapView).onStart()
you can also check for number of calls like
verify(mapView, times(1)).onStart()
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.
Unit test changes look good to me :)
* Starts the map without GPS | ||
* By default it points to 51.50550,-0.07520 this coordinates | ||
*/ | ||
private void startMapWithoutGPS() { |
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.
@Ayan-10 Thanks :) |
Description (required)
Fixes #3732(comment)
What changes did you make and why?
Made Nearby tab accessible without GPS.
Tests performed (required)
Tested latest master ProdDebug on Realme GT master with API level 30.