https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40504

Pedro Amorim <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #191203|0                           |1
        is obsolete|                            |

--- Comment #49 from Pedro Amorim <[email protected]> ---
Created attachment 193193
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193193&action=edit
Bug 40504: Add tests

Test plan, ktd, apply patches:
1) Enable ILLModule
2) Create a new ILL request, visit:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Set a 'type', add a cardnumber e.g. '23529000035676', and a library. Click
'Submit'.
4) Notice the new 'Managed by' field entry on the 'Manage request' page. This
should be assigned to your logged in user.
5) Click 'Edit request' from the top toolbar
6) Notice the new 'Managed by' form entry. Click 'Select manager' and click
'Search'. Only the 'koha' user should be returned.
7) Notice the message at the top 'Only staff with superlibrarian or ILL
permissions are returned in the search results'.
8) Let's give 'ill' permissions to Edna Acosta, visit:
<staff_url>/cgi-bin/koha/members/member-flags.pl?member=5
9) Search for 'ill' permission (Search for 'interlibrary' on the top right
search bar) and set 'ill' permission to Edna Acosta. Save.
10) Repeat 6). Notice that now when you use the patron search modal Edna Acosta
is also returned. Select Edna. Click 'Submit' to edit the request.
11) Edit again. Notice the 'Managed by' is showing 'You', with the message
'Previously was Edna Acosta'. This is the desired behavior mimicked from
Suggestions i.e. the staff member that is editing the request details is
assumed to becomes it's manager by default. The staff member must click 'Keep
existing manager' if they want to submit changes without changing the request's
manager. Test buttons, save, verify that it all works.
12) Visit the ILL list table:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl
13) Click 'columns' and pick 'Managed by'. Notice it shows correctly with the
link to the patron and sorting also works.
14) Create a new user without permissions (OPAC only user)
15) Access the OPAC ILL and login as that user (preferably on a different
browser session as we'll want to access the staff UI as staff member again),
visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard
16) Pick a type and click 'Create'
17) Repeat 12) Notice the newly created request from OPAC is 'Managed by':
Nobody. This is intentional as that request still needs to be assigned to a
staff member.

Suggestions testing:
1) This testing is also important as the existing suggestions 'Managed by'
functionality has been abstracted to be utilized by both the suggestions and
ILL module.
2) Access suggestions, visit:
<staff_url>/cgi-bin/koha/suggestion/suggestion.pl
3) Click 'New purchase suggestion'. Notice the select manager button is also
there. Click it and click 'search'. On the modal, the following message should
show 'Only staff with superlibrarian or full suggestions permissions are
returned in the search results' and the patrons shown should reflect that.
4) Do the same exercises here as we just did for the ILL module, i.e. create a
staff member with permission 'suggestions.suggestions_manage' and ensure that
shows on the modal, assign that patron as manager, edit again, verify that it
defaults to 'You' and that the 'Keep existing manager' button works as before.
5) Finally, test the suggestions list table, repeat 2) and notice the 'Update
manager' action at the bottom, test that that works just as well, by checking a
few suggestions boxes, selecting a manager to your selection and clicking the
'Submit' button under it.

Run tests:
prove t/db_dependent/Koha/ILL/Request.t
prove t/db_dependent/api/v1/ill_users.t

Signed-off-by: Jeremy Evans <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to