Closed theocrsb closed 1 month ago
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Attention: Patch coverage is 34.48276%
with 19 lines
in your changes missing coverage. Please review.
Project coverage is 37.95%. Comparing base (
ef77780
) to head (eaac9e2
).
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
With your solution, the value entered by the user will always be rounded even if he doesn't want to.
The issue related by the bug comes from the fact that the endpoint to add a train requires a speed in m/s and not in km/h. So when the conversion is done when adding (save) and getting the train (for edit), some extra decimals can pop.
I think it would be better to handle this logic in the
adjustConfWithTrainToModifyV2
function, l.151 when we are getting the initialSpeed from the train and update the store with it by converting the value in km/h.const convertedInitialSpeed = initial_speed ? Math.round(msToKmh(initial_speed) * 10) / 10 : 0) dispatch(updateInitialSpeed(convertedtedInitialSpeed));
NB :
- Maybe you can add the const before all the dispatch
- Maybe we need to check with a PO how many decimal max we want
After discussion with a PO, it was decided to keep only one digit after the decimal point.
close #7271