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

fix(champ): champ value formatters should check champ type #10412

Merged

Conversation

tchak
Copy link
Member

@tchak tchak commented May 13, 2024

No description provided.

Copy link

what-the-diff bot commented May 13, 2024

PR Summary

  • Improvement in Type Champ Model
    The code in the type_de_champ.rb file has been tweaked to properly handle certain types of data fields (called 'champs') more efficiently. This has been done by introducing a private controller method that checks if default values should be used for certain types of these data fields.

  • Champ Model Test Case Updates
    The modified way of handling these data fields has been covered by adding more scenarios to the test cases in the champ_spec.rb file. This ensures that the revision and modifications are working as expected.

  • Dossier Projection Service Test Case Edits
    In the dossier_projection_service_spec.rb file, changes have been made to focus on individual 'type champ' IDs rather than a collection. Some test data has also been altered to be more specific. Moreover, a print statement has been added for testing purposes, making it easier for developers to understand what is happening during test runs.

Copy link
Member

@colinux colinux left a comment

Choose a reason for hiding this comment

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

super, beaucoup plus plus clair en plus ! 🚀

Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.79%. Comparing base (d4e6e2e) to head (a1db089).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10412   +/-   ##
=======================================
  Coverage   80.79%   80.79%           
=======================================
  Files        1193     1193           
  Lines       25133    25139    +6     
  Branches     4523     4526    +3     
=======================================
+ Hits        20306    20312    +6     
  Misses       4827     4827           

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

@tchak tchak force-pushed the fix-champ-type-de-champ-mismatch branch from bafe721 to 520af57 Compare May 13, 2024 14:41
@tchak tchak enabled auto-merge May 13, 2024 14:42
@tchak tchak force-pushed the fix-champ-type-de-champ-mismatch branch from 520af57 to a1db089 Compare May 13, 2024 15:00
@tchak tchak added this pull request to the merge queue May 13, 2024
Merged via the queue into demarches-simplifiees:main with commit 1750641 May 13, 2024
18 checks passed
@tchak tchak deleted the fix-champ-type-de-champ-mismatch branch May 13, 2024 15:34
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.

2 participants