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

Entitlement approve validation improvements

Open reichie020212 opened this issue 1 year ago • 1 comments

Why is this change needed?

It is possible to approve the entitlement even though the cycle is not yet approved

How was the change implemented?

Added a validation in approving entitlements where it will not proceed in approving if the cycle is still not approved.

New unit tests

spp_programs/tests/test_entitlement.py::TestEntitlement::test_12_approve_entitlement

Unit tests executed by the author

spp_programs/tests/test_entitlement.py::TestEntitlement

How to test manually

  • Install spp_programs module

  • Create a program

  • Create a cycle under the program

  • Enter the cycle

  • Click Prepare Entitlement button.

  • Enter Entitlement page using the Entitlement button in the top-center page.

  • Either approve one or all of the entitlements.

  • Check if an error shows

  • Go back to Cycle and approve it

  • Go back to Entitlements page and approve them

  • Check if there is no error anymore

Related links

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

reichie020212 avatar Aug 21 '24 04:08 reichie020212