IMPROVE - Add test coverage for OdometerViewModel
What it Does
Resolves #379 by validating CRUD operations for OdometerViewModel
- Tests initial state, add/delete/get/update odometer readings, and get vehicles
How I Tested
- Set
useEmulatortotruewithinOdometerViewModelTestsinitfunction - Initialize each test with a
userUID,viewModel, andnewReading - Test CRUD operations by adding, deleting, updating, and fetching
newReading, then checking database fornewReading
Notes
- This is my first contribution in a codebase that isn't my own and is this large - would appreciate any feedback with regard to approach, things to consider, alternatives, folder structure, etc.
- Is issue the same as a PR? I created a new issue #379, but this ticket contains more information about what was done. Is this redundant or meant to be separate? Is there a better way to link the two?
Thank you for contributing!
The point of the issue is because it's more of the idea of "what are you planning to do" it generally doesn't have the exact specifics of how to complete that issue
The PR is more about describing what exactly you did and why. (Because it's closer related to the git history and will have details that may be helpful if there's a bug found in the future related to this PR)
So how you wrote them is fine! I'm about to review the PR itself, so I may make more notes, but generally for this project you should be using the Firebase emulator. Is there anything in the CONTRIBUTING instructions that I can add that makes it easier to understand what it's for and why you should be using it when contributing to this project?
Thanks for the explanation - I'll do some more investigation on Firebase emulator and how to write better tests around that (instructions were clear, I was just worried about biting off more than I could chew). Will come back with a proposed plan. If you do end up with some feedback before that, please share!