-
Notifications
You must be signed in to change notification settings - Fork 16
Add POIs to accessibility map #1406
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
base: main
Are you sure you want to change the base?
Add POIs to accessibility map #1406
Conversation
ca5df6c
to
3cf5de5
Compare
3cf5de5
to
4fe83c7
Compare
If POIs are imported in the database from open street map, the accessibility map stats will now fetch that data from the db and display the number of POIs in the accessibility polygon, as well as their categories. Fix: chairemobilite#1404
4fe83c7
to
9f3983e
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.
More tests required
accessiblePlacesCountByDetailedCategory: { [key in PlaceDetailedCategory]: number }; | ||
}> => { | ||
try { | ||
const accessiblePlacesCountByCategory = categories.reduce( |
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.
ça prendrait des tests séquentiels pour cette fonction dans places.db.queries.test.ts. Il est important que toutes les fonctions BD soient bien testées de façon relativement exhaustive.
@@ -165,6 +188,7 @@ describe('Test accessibility map with results', () => { | |||
} | |||
}; | |||
mockedNodesDbCollection.mockResolvedValue({ type: 'FeatureCollection', features: [ node1, node2, node3 ] }); | |||
mockedPlacesPOIsCount.mockResolvedValue({accessiblePlacesCountByCategory, accessiblePlacesCountByDetailedCategory}) |
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.
Tu ajoutes un mock avec une valeur resolved, mais il n'y a pas de tests qui l'utilise. Il faudrati valider que la fonction a été appelée avec les bonnes valeurs
If POIs are imported in the database from open street map, the accessibility map stats will now fetch that data from the db and display the number of POIs in the accessibility polygon, as well as their categories. Fix: #1404