Koha-clms/t/db_dependent/Koha
Jonathan Druart 6cbe190092 Bug 37870: Fix sort order of class sources
There are several things going on here.
The tests are failing randomly when some additional class sources are in the
DB. This should never happen on Jenkins, but it happened, see the third
patch of this patch set (spoiler: tests not run within a txn)

There were also a sorting problem: by default sort will show
uppercases first:
  A, B, C, a, b, c
However we want:
  a, A, b, B, c, C
which is what fc does (https://perldoc.perl.org/functions/fc)

Test plan:
0. Checkout the main branch, without patches from this patchset.
1. Run t/db_dependent/ClassSources.t several times
=> Notice that new entries in the DB table 'class_sources' are created
2. Run t/db_dependent/Koha/UI/Form/Builder/Biblio.t and
t/db_dependent/Koha/UI/Form/Builder/Item.t
=> They fail (if not, run t/db_dependent/ClassSources.t again)
3. Apply the patches
4. Run t/db_dependent/ClassSources.t
=> No more additional entries in DB, tests are correctly run within
transactions
5. Run t/db_dependent/Koha/UI/Form/Builder/Biblio.t and
   t/db_dependent/Koha/UI/Form/Builder/Item.t several times
=> They always pass

Note that the sort should actually be done on the description, not the
code. But that's for another bug...

Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 405c2ac6b6)
2024-11-15 21:05:28 +00:00
..
Account Bug 28664: (follow-up) Throw exception if debt if VOID 2024-07-19 15:53:36 +00:00
Acquisition Bug 36018: (follow-up) Do not rely on assumed correct quantities 2024-05-10 16:45:47 +02:00
Auth Bug 36503: (follow-up) Fix tests count 2024-05-10 14:11:53 +02:00
BackgroundJob Bug 37182: Regression tests 2024-07-18 20:26:59 +00:00
BackgroundJobs Bug 34587: (QA follow-up) Tidy 2023-10-31 16:46:32 -03:00
Biblio Bug 31791: Add Koha::Biblio::Metadata->record_source 2024-04-26 20:15:38 +02:00
Cash
…
Charges
…
Checkouts Bug 33362: Allow return claims to be resolved even if the issue has since been delete from the database 2023-05-24 11:21:31 -03:00
CirculationRules
…
Club
…
Config Bug 32478: (QA follow-up) Shebang and chmod for Koha/Config/SysPrefs.t 2023-06-07 15:25:22 -03:00
Database
…
ERM Bug 35418: Add TR_B2 tests 2023-11-29 17:36:11 -03:00
Edifact Bug 30070: Add unit tests 2024-01-17 11:38:54 +01:00
Filter
…
ILL Bug 35581: Fix failing t/db_dependent/Koha/ILL/Request.t 2024-04-22 08:57:48 +02:00
Import
…
Item
…
Items
…
Library
…
Notice Bug 35285: (QA follow-up) Tidy 2024-05-17 10:36:38 +02:00
Object/Mixin Bug 11844: (follow-up) Fix tests 2023-05-16 12:58:38 +02:00
Objects Bug 37389: (QA follow-up) Tidy 2024-08-29 17:42:21 +00:00
Old Bug 35353: Add REST API endpoint to retrieve old holds 2024-04-26 18:06:09 +02:00
Patron Bug 32610: (QA follow-up) Fix unit tests 2024-04-30 17:09:51 +02:00
Patrons Bug 34621: Tidy Import.t 2024-04-12 14:02:42 +02:00
Plugins Bug 30047: (follow-up) Fix failing tests 2024-05-13 16:24:18 +02:00
Policy Bug 30825: Move holds_control_library to Koha::Policy::Holds 2023-09-22 12:35:46 -03:00
Preservation Bug 33547: (QA follow-up) Tidy 2023-10-23 11:33:53 -03:00
REST Bug 35536: Add RemovePlugins calls in plugin unit tests 2024-03-22 12:26:39 +01:00
SMTP Bug 33964: Use Email::Sender::Transport::SMTP::Persistent for sending email 2023-07-24 14:55:33 -03:00
SearchEngine Bug 35138: (follow-up) Mark DisplayLibraryFacets as zebra only 2024-05-09 09:32:59 +01:00
Subscription
…
Tags
…
Template/Plugin Bug 35955: Add tests 2024-03-01 10:55:53 +01:00
Ticket Bug 35657: Unit tests for relation accessor additions 2024-05-02 15:03:36 +02:00
UI/Form/Builder Bug 37870: Fix sort order of class sources 2024-11-15 21:05:28 +00:00
XSLT
…
Z3950Responder
…
Account.t Bug 34912: Add 14 hours to 1970 date in Account(s).t 2023-10-04 09:15:39 -04:00
ActionLogs.t
…
AdditionalContents.t Bug 36875: Unit test 2024-06-06 10:49:20 +02:00
AdditionalField.t Bug 35190: Adjust tests 2023-11-03 14:22:46 -03:00
ApiKey.t
…
ArticleRequest.t Bug 35030: Add 'article' to patron activity triggers 2023-10-24 10:05:26 -03:00
ArticleRequests.t Bug 34916: Fix wrong borrowernumber in ArticleRequests.t 2023-10-04 09:15:39 -04:00
Authorities.t Bug 30047: (follow-up) Fix failing tests 2024-05-13 16:24:18 +02:00
BackgroundJob.t Bug 35962: (bug 35843 follow-up 2) Fix BackgroundJob.t on D10 2024-02-06 08:52:36 +01:00
BackgroundJobs.t
…
Biblio.t Bug 38094: (follow-up) edit_catalogue implies fast_cataloguing 2024-10-23 22:46:35 +00:00
BiblioFrameworks.t
…
Biblios.t Bug 33974: Add Koha::Biblios->api_query_fixer 2023-07-03 14:51:42 -03:00
Booking.t Bug 36120: Add unit test for pickup_library relation accessor 2024-05-03 16:02:49 +02:00
Bookings.t Bug 36428: (QA follow-up) Remove filter_by_future 2024-07-18 19:29:25 +00:00
Checkout.t
…
Checkouts.t Bug 34924: Handle final renewal errors 2023-10-31 11:02:47 -03:00
CirculationRules.t Bug 32271: Unit test 2023-07-19 13:00:37 -03:00
Cities.t
…
ClassSortRules.t
…
ClassSources.t
…
ClassSplitRules.t
…
Course.t Bug 28762: Add test for new 'instructors' accessor 2024-08-28 20:20:33 +00:00
Courses.t Bug 36535: (bug 33568 follow-up) Add missing tests 2024-04-26 14:14:48 +02:00
CoverImages.t
…
CsvProfiles.t
…
CurbsidePickups.t
…
Database.t
…
Desks.t
…
EDI.t Bug 35398: (QA follow-up) Tidy code 2024-03-07 15:02:47 +01:00
Encryption.t
…
Hold.t Bug 35353: Add REST API endpoint to retrieve old holds 2024-04-26 18:06:09 +02:00
Holds.t Bug 29087: (QA follow-up): Fix QA tests 2024-08-28 19:40:41 +00:00
Item.t Bug 28762: (Rmaint follow-up) Adjust number of tests 2024-08-28 20:20:34 +00:00
ItemTypes.t Bug 34357: Replace SUPER->imageurl in ItemTypes 2023-08-15 12:16:48 +03:00
Items.t Bug 38148: Unit tests 2024-10-23 22:31:23 +00:00
KeyboardShortcuts.t
…
Libraries.t Bug 9525: (QA follow-up) Tidy 2023-10-04 16:40:12 -04:00
Library.t Bug 36480: Add Koha::Library->desks 2024-04-26 18:06:09 +02:00
MarcSubfieldStructures.t
…
Notice_Util.t
…
Notices.t
…
Object.t Bug 36919: Remove yet another warning from Koha/Object.t 2024-11-15 20:28:54 +00:00
Objects.t Bug 37510: Fix Objects.t and remove FIXME 2024-09-11 19:19:22 +00:00
Old.t
…
Patron.t Bug 37892: (QA follow-up) Add tests for ->is_guarantor/ee 2024-11-14 14:51:03 +00:00
Patron_generate_userid.t
…
Patrons.t Bug 37378: Tidy 2024-08-29 15:07:54 +00:00
Pseudonymization.t Bug 35277: (follow-up) Fix tests 2024-01-16 16:35:08 +01:00
PseudonymizedTransaction.t Bug 34611: Unit tests 2024-03-19 10:25:04 +01:00
Quotes.t
…
Ratings.t Bug 33953: Adjust tests 2023-07-13 15:19:36 -03:00
Recall.t Bug 32496: Reduce unnecessary unblessings of objects in Circulation.pm 2023-09-22 10:52:39 -03:00
Recalls.t Bug 32696: Unit tests 2024-09-12 21:57:38 +00:00
Reports.t Bug 37508: (QA follow-up) Move check to Koha::Report, extend 2024-08-12 15:35:15 -03:00
Reviews.t
…
SMS_Providers.t
…
SearchField.t Bug 20388: (QA follow-up) Tidy 2024-04-16 17:59:47 +02:00
Session.t Bug 36098: (follow-up) extend test to check driver 2024-03-01 10:55:33 +01:00
SharedContent.t
…
Statistic.t Bug 37182: Regression tests 2024-07-18 20:26:59 +00:00
Statistics.t Bug 33608: (QA follow-up) Remove ->insert method 2023-10-25 11:07:59 -03:00
Subscription.t
…
Suggestion.t
…
Suggestions.t Bug 36122: Update unit test 2024-05-02 15:03:33 +02:00
Tags.t
…
Ticket.t Bug 35657: Unit tests for relation accessor additions 2024-05-02 15:03:36 +02:00
Virtualshelf.t
…
Virtualshelves.t
…
Z3950Servers.t
…