openspp-modules icon indicating copy to clipboard operation
openspp-modules copied to clipboard

Added validation for not activated language in the file

Open reichie020212 opened this issue 1 year ago • 2 comments

Why is this change needed?

Need to add a checker if all language is activated.

How was the change implemented?

Added a validation that checks if all language in the uploaded file is activated.

New unit tests

No new unit tests

Unit tests executed by the author

spp_area/tests/test_area_import.py::AreaImportTest

How to test manually

  • Install the module spp_area
  • go to Area -> Area Import

Test 1

  • Upload the file. make sure that the file have a language that is not activated.
  • Click Import button.
  • Check if there is an error message.

Test 2

  • Activate the language.
  • Import again the file.
  • Check if there is no error message anymore.

Related links

https://github.com/OpenSPP/openspp-modules/issues/464

reichie020212 avatar Sep 03 '24 05:09 reichie020212

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 73.23%. Comparing base (c2d1b67) to head (08826de). Report is 192 commits behind head on 17.0.

Additional details and impacted files
@@            Coverage Diff             @@
##             17.0     #566      +/-   ##
==========================================
- Coverage   73.50%   73.23%   -0.28%     
==========================================
  Files         560      544      -16     
  Lines       14084    13622     -462     
  Branches     1799     1750      -49     
==========================================
- Hits        10353     9976     -377     
+ Misses       3414     3348      -66     
+ Partials      317      298      -19     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Sep 03 '24 05:09 codecov[bot]