Skip to content
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

provide a undefined/null speed limit when user provide empty field #6428

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

kmer2016
Copy link
Contributor

@kmer2016 kmer2016 commented Jan 23, 2024

fix the first problem of this issue

The problem was that the way we converted the values entered in Speed limit field returned 0 when the field was left empty.

How to test ?

  • On Infra Editor, load an infra
  • Open Speed limit tool (image
  • add some Speed limit with empty key/value
  • save and check on network tab of devtools that the payload of the request POST on url http://localhost:4000/api/infra/4/ replace empty speed limit by undefined/null

@kmer2016 kmer2016 requested a review from a team as a code owner January 23, 2024 14:21
@kmer2016 kmer2016 requested review from Yohh, Math-R and Akctarus January 23, 2024 14:22
Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (e5390a5) 27.71% compared to head (4c0a4f4) 22.73%.

Files Patch % Lines
...tor/tools/rangeEdition/speedSection/SpeedInput.tsx 0.00% 5 Missing ⚠️
...eEdition/speedSection/SpeedSectionMetadataForm.tsx 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #6428      +/-   ##
============================================
- Coverage     27.71%   22.73%   -4.98%     
============================================
  Files          1003      694     -309     
  Lines        126630   115343   -11287     
  Branches       2580      808    -1772     
============================================
- Hits          35093    26223    -8870     
+ Misses        90047    88316    -1731     
+ Partials       1490      804     -686     
Flag Coverage Δ
core ?
editoast 75.46% <ø> (+<0.01%) ⬆️
front 8.36% <0.00%> (-0.01%) ⬇️
gateway 2.50% <ø> (ø)
railjson_generator 87.44% <ø> (ø)
tests 81.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kmer2016 kmer2016 requested review from flomonster and Akctarus and removed request for Akctarus and flomonster January 23, 2024 14:24
@kmer2016 kmer2016 changed the title provide a undefined speed limit when user provide empty field provide a undefined/null speed limit when user provide empty field Jan 23, 2024
Copy link
Contributor

@Akctarus Akctarus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, LGTM

Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it works 🎉.

Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm and tested. As specified by @Yohh, the key issue demands more work and will be fixed in a different PR

@kmer2016 kmer2016 added this pull request to the merge queue Jan 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 25, 2024
@flomonster flomonster added this pull request to the merge queue Jan 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 25, 2024
@kmer2016 kmer2016 force-pushed the cnh-fix-speed-limit-edition branch from 4acb6a6 to 4c0a4f4 Compare January 25, 2024 10:54
@kmer2016 kmer2016 enabled auto-merge January 25, 2024 10:58
@kmer2016 kmer2016 added this pull request to the merge queue Jan 25, 2024
Merged via the queue into dev with commit f062f1f Jan 25, 2024
20 checks passed
@kmer2016 kmer2016 deleted the cnh-fix-speed-limit-edition branch January 25, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants