CoronaTeam / CoronaGame

Software Development Project 2020
3 stars 0 forks source link

Feature/user paths #142

Closed lucieho closed 4 years ago

lucieho commented 4 years ago

What this brings: Click on the history button on the map (bottom left). There is a new button in the history dialog to toggle last path view on the map. This colored path corresponds to the last positions of a user. When clicking on the button, the map camera moves to the path location.

How it is going to be enhanced on another branch: The next goal will be to show the infected users met on this path. Then to be able to choose which path to show (yesterday, the day before yesterday, etc).

Note: The shown path is an ugly straight path uploaded to the database. I may consider (in the future) uploading a more realistic path (taking the relief into account) for the demo to make more sense.

lucieho commented 4 years ago

PS: I think you have not enough code coverage in your tests. Can't it be more tested ? Maybe it's because of its map-nature I don't know

Indeed, I was not able to test PathsHandler on its own. Though I had tested it as a PathFragment before, now that it's not a Fragment anymore, it's less easy. Other difficulties are about testing asynchronous Firestore interactions, and testing the UI interaction with the map.

I started making a MapActivityTest class to test the PathsHandler part. Hoping to finish everything by tonight.

lucieho commented 4 years ago

But yeah, feel free to comment them if they do not pass. We should review all what's going on and fix it.

I finally commented the TabActivityTest that was preventing cirrus to pass the build due to a " UserInfectionFragment not attached to context" error. As we discussed, it seems the issue is more about TabActivity, and should thus not be treated in this PR.

codeclimate[bot] commented 4 years ago

Code Climate has analyzed commit f15998c1 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

The test coverage on the diff in this pull request is 66.1% (80% is the threshold).

This pull request will bring the total coverage in the repository to 79.6% (-0.7% change).

View more on Code Climate.