Resolves #5224: Banks can see partners's active children using items when deactivating
Resolves #5224
Description In inventory when an item is deactivated it displays list of partners which contains child requests
Screenshot
Thanks for the PR! Please add a test to cover this case.
@dorner Can you help me regarding test I have to write Rspec test for this ? Is there anything used for writing tests in this project
Hi @jeet12323 - please look under spec/requests for a lot of examples. You want to check the response for a particular piece of text. Here's a decent example: https://github.com/rubyforgood/human-essentials/blob/33097ff9953e9f51dd8a47f5ba8cc5a1ccb62230/spec/requests/donations_requests_spec.rb#L303-L303
@dorner I have written rspec and commited at that time all tests were passed when i updated branch in github directly main was merged into this and 2 checks are failed if you could guide me further regarding this
Probably flaky tests. Over to @awwaiid for functional testing.
Functional Testing
@jeet12323 Thanks for getting this one started. There are a few things I'm noticing during functional testing.
- In the details, we need to address all three bullet points. (item not visible, partner groups changing the items that are allowed, deactivation). Currently, we are only addressing the deactivation scenario.
Item not visible scenario: Found under Items & Inventory > Click Edit on an Item > Notice Item Visible to Partners? checkbox gets deselected
Partner Groups Changing scenario: partner groups can be found under Partner Agencies > All Partners > Groups tab > Edit a group > Deselect a partner group that is included
- Also, I see you have created a warning message to address this issue. It seems in the details section we want a confirmation dialog asking us if we should proceed.
@jeet12323 are you able to update and work on this? @cielf can you confirm my findings with the original ask?
Thanks!
That sounds right --
The idea is that we should check in all the cases where, if the bank takes that action, it would impact whether a partner should be able to ask for the item.
Having a confirmation allows the bank to make their own call on whether they want to reach out to the partners affected before making the change.
Note that we may want a followup issue to refine the check on the children to "not archived" rather than active, based on the fallout from #3806 , but that needn't affect this PR.
@cielf @janeewheatley Ok sure i will start working on these things,I am not allowed to push in this branch anymore could u help me proceed?
@jeet12323 Not sure what is going wrong with this branch for pushing, but it would be totally fine to open up a new branch / PR if that works better.