human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

Resolves #5224: Banks can see partners's active children using items when deactivating

Open jeet12323 opened this issue 3 months ago • 8 comments

Resolves #5224

Description In inventory when an item is deactivated it displays list of partners which contains child requests

Screenshot image

jeet12323 avatar Aug 31 '25 18:08 jeet12323

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

jeet12323 avatar Sep 12 '25 19:09 jeet12323

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 avatar Sep 12 '25 19:09 dorner

@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

jeet12323 avatar Oct 05 '25 08:10 jeet12323

Probably flaky tests. Over to @awwaiid for functional testing.

dorner avatar Oct 05 '25 14:10 dorner

Functional Testing

@jeet12323 Thanks for getting this one started. There are a few things I'm noticing during functional testing.

  1. 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

  1. 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!

janeewheatley avatar Nov 09 '25 15:11 janeewheatley

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 avatar Nov 13 '25 15:11 cielf

@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 avatar Dec 06 '25 09:12 jeet12323

@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.

awwaiid avatar Dec 07 '25 15:12 awwaiid