Koha-clms/t/db_dependent
Pedro Amorim d3173a8d7b
Bug 36197: Add tests
0) If k-t-d, run updatedatabase (ignore this if testing on a sandbox)
1) Enable ILLModule syspref:
  {staff_url}/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=ILLModule
2) No need to install a backend as 35570 is in the tree
3) On a different browser session, without being lgoged in, access the create ILL request OPAC page directly:
  {opac_url}/cgi-bin/koha/opac-illrequests.pl?method=create&backend=Standard
4) Notice you're presented with the login page, as expected
5) Enable ILLOpacUnauthenticatedRequest:
  {staff_url}/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=ILLOpacUnauthenticatedRequest
6) Repeat step 3) Notice you now get the create ILL request form, with some additional inputs at the top specific to an unauthenticated request (first name, last name, e-mail address)
6.5) (optional) Confirm the 'Make an Interlibrary loan request' link exists at the bottom of the search results page, while unauthenticated on OPAC:
  {opac_url}/cgi-bin/koha/opac-search.pl?idx=&q=music&weight_search=1
  This should only show for authenticated OPAC users if ILLOpacUnauthenticatedRequest is off.
7) Test the form, try submitting with some blank fields, change type and library after and before inputing data in the input fields, etc.
8) Submit the form successfully. Notice you're presented with the unauthenticated request submission confirmation screen with a message and request details.
9) Go back to Staff UI, logged in, access ILL requests and confirm the unauthenticated request submitted through the OPAC is there:
  {staff_url}/cgi-bin/koha/ill/ill-requests.pl
10) Test that you can add a patron afterwards, if needed, by clicking 'Edit request' on the toolbar of the manage request page, and entering a patron ID
11) Test that you're able to 'confirm' the request by clicking 'Confirm request', as if it was a regular 'NEW' request.

Additional testing:
 Make sure existing ILL functionality interacts with this new optional workflow behavior.
 For this, we're using ILLModuleDisclaimerByType. ILLCheckAvailability or AutoILLBackendPriority can also be used but require more setup (plugins, credentials, etc)
1) Configure ILLModuleDisclaimerByType, visit
  {staff_url}/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=ILLModuleDisclaimerByType
2) Click the 'edit' link at the bottom of the syspref and copy the example code from the description into the text box. Save.
3) Repeat the original test plan from above, but make sure the request type is not 'article' (as that type is bypassed). Use 'journal', for example. Submit the request making sure you fill in all mandatory fields.
4) Notice you're now presented with the ILL request disclaimer screen, hit Submit. Notice the request is created as before.
5) Return to Staff UI, logged in, confirm this 2nd unauthenticated request has been created and the type disclaimer info is stored and presented when viewing the request.

Run tests (k-t-d only):
  prove t/db_dependent/Koha/ILL/Request/Config.t
  prove t/db_dependent/selenium/opac_ill_requests.t

Sponsored-by: NHS England (National Health Service England)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 08:47:06 +02:00
..
Acquisition Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Auth Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
AuthoritiesMarc Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Authority Bug 38142: Choose language to report from authority to bibliographic record. 2025-04-25 08:46:38 +02:00
Biblio Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Budgets Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Circulation Bug 38944: Correctly catch warnings raised by DBI 2025-03-13 17:25:05 +01:00
CourseReserves Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Creators Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Exporter Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Holds Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
HoldsQueue
…
Items Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha Bug 36197: Add tests 2025-04-25 08:47:06 +02:00
LDAP Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Labels Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Letters Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Members Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
OAI Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Patron Bug 14250: Patron with fines cannot be discharged anymore 2025-04-22 08:46:26 +02:00
Record Bug 38944: Tidy t/db_dependent/Record/Record.t 2025-03-19 17:34:53 +01:00
Reports Bug 37784: Do not show forbidden columns in reports dictionary 2025-04-14 08:51:23 +02:00
Reserves Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
SIP Bug 38615: (follow-up) Unit tests 2025-03-17 08:21:26 +01:00
Search Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Serials Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Template/Plugin Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Utils Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
api/v1 Bug 38905: change permissions for item creation and modification 2025-04-22 08:46:52 +02:00
cronjobs Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
data
…
misc/translator Bug 39130: (QA follow-up): Ignore useful untidy part of sample.tt 2025-03-17 11:59:54 +01:00
mojo Bug 37286: Add tests for REST authentication through Mojo apps 2025-03-17 08:21:23 +01:00
selenium Bug 36197: Add tests 2025-04-25 08:47:06 +02:00
www Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
00-strict.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Accounts.t Bug 33473: Rename UseEmailReceipts to AutomaticEmailReceipts 2025-04-25 08:46:43 +02:00
Acquisition.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Amazon.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ArticleRequests.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
AudioAlerts.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Auth.t Bug 38664: Fix some tests 2025-02-11 14:58:26 +01:00
AuthUtils.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Auth_with_cas.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Auth_with_ldap.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Auth_with_shibboleth.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
AuthorisedValues.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
AuthoritiesMarc.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
AuthoritiesMarc_GetTagsLabels.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Barcodes.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Barcodes_ValueBuilder.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Biblio.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Biblio_holdsqueue.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Breeding.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Breeding_Auth.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Budgets.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Cache.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Calendar.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Charset.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Circulation.t Bug 39313: Unit test for passing valid item object to CanBookBeIssued 2025-03-17 08:21:18 +01:00
Circulation_holdsqueue.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
ClassSources.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Clubs.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Context.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Contract.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
CourseReserves.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
DecreaseLoanHighHolds.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Filter_MARC_ViewPolicy.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Fines.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
FrameworkPlugin.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Heading.t Bug 38729: Unit tests 2025-04-14 08:50:57 +02:00
Heading_MARC21.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Hold.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Holds.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
HoldsQueue.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Holidays.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ILSDI_Services.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ImportBatch.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ImportExportFramework.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Installer.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Items.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha_Database.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha_Elasticsearch.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha_ExternalContent_OverDrive.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Koha_MetadataRecord_Authority.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha_Misc_Files.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Languages.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Letters.t Bug 38474: Prevent Letters.t to fail on slow server 2025-02-13 15:31:00 +01:00
LibraryGroups.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Linker_Default.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Linker_FirstMatch.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Log.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
MarcModificationTemplates.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Matcher.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Members.t Bug 37418: (follow-up) Add unit tests for GetBorrowersToExpunge() 2025-04-25 08:46:52 +02:00
Message.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
MungeMarcPrice.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Overdues.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Passwordrecovery.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
PatronLists.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Patroncards.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Patrons.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Prices.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Record.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
RecordProcessor_EmbedSeeFromHeadings.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Reports.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Reserves.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
RotatingCollections.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Search.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Serials.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Serials_2.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Service.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ShelfBrowser.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Sitemapper.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
SocialData.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
StockRotationItems.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
StockRotationRotas.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
StockRotationStages.t Bug 39717: Use numeric comparison for stock rotation stages 2025-04-24 19:53:15 +02:00
SuggestionEngine_ExplodedTerms.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Suggestions.t Bug 38944: Correctly catch warnings raised by DBI 2025-03-13 17:25:05 +01:00
TablesSettings.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Tags.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Templates.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
TestBuilder.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Upload.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
UsageStats.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Virtualshelves.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
XISBN.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
XSLT.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
check_kohastructure.t Bug 38944: Fix tidiness t/db_dependent/check_kohastructure.t 2025-03-17 11:59:48 +01:00
check_sysprefs.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
db_structure.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
rollingloans.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
sysprefs.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
yaml.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
zebra_config.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00