-
Notifications
You must be signed in to change notification settings - Fork 490
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
fix: Correct selection of menu item in Navigation drawer #1416
Conversation
The build is failing✨ Good work on this PR so far! ✨ Unfortunately, the Circle CI build is failing as of 962cd2b. Here's the output:
|
1 similar comment
The build is failing✨ Good work on this PR so far! ✨ Unfortunately, the Circle CI build is failing as of 962cd2b. Here's the output:
|
@iamareebjamal, please help me with the test |
Tests are failing. Fix them |
The testBack() function in FragmentNavigator.java is asserting that the dashboard should be active after pressing back, which seems implausible since when inside a subfragment pressing back will lead to the fragment and not the dashboard. |
True, add a test case for that and fix this issue |
Codecov Report
@@ Coverage Diff @@
## development #1416 +/- ##
================================================
+ Coverage 24.29% 24.3% +<.01%
Complexity 757 757
================================================
Files 237 237
Lines 8718 8720 +2
Branches 352 353 +1
================================================
+ Hits 2118 2119 +1
Misses 6517 6517
- Partials 83 84 +1
Continue to review full report at Codecov.
|
assertTrue(fragmentNavigator.isDashboardActive()); | ||
if (fragmentManager.getBackStackEntryCount() == 1) | ||
assertTrue(fragmentNavigator.isDashboardActive()); | ||
else assertFalse(fragmentNavigator.isDashboardActive()); |
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.
No if statements in tests
This reverts commit 150c754.
Fixes #1383
Checklist:
Note: This bug was not afflicting only the Attendees fragment having the Activity Log as a subfragment but, every other fragment having subfragments.
Changes: Correct menu item is selected in Navigation drawer even when the back button is pressed from a subfragment.
Screenshot after the change: