Koha/t
Jonathan Druart 405c2ac6b6
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>
2024-09-12 13:52:35 +02:00
..
Acquisition
Biblio
Budgets
Circulation Bug 37155: Refactor GetAgeRestrictions 2024-07-01 18:55:50 +02:00
cypress Bug 37513: Fix and add more Cypress tests 2024-09-09 17:44:51 +02:00
data
db_dependent Bug 37870: Fix sort order of class sources 2024-09-12 13:52:35 +02:00
edi_testfiles
etc
External
Koha Bug 37389: Add tests 2024-08-02 18:59:53 +02:00
lib Bug 36367: Remove _new_userenv 2024-06-14 11:17:17 +01:00
mock_templates/intranet-tmpl/prog Bug 35402: Update the OPAC and staff interface to Bootstrap 5 2024-08-23 15:58:41 +02:00
Number
Search
Serials Bug 32392: Tests for changes in C4::Serials::GetNextSeq 2024-04-29 15:19:30 +02:00
SIP
Template
Test
00-check-atomic-updates.t
00-deprecated.t
00-load.t
00-merge-conflict-markers.t
00-testcritic.t
00-valid-xml.t
Auth.t
AuthoritiesMarc_MARC21.t
AuthoritiesMarc_UNIMARC.t
Barcodes_annual.t
Barcodes_EAN13.t
Barcodes_hbyymmincr.t
Barcodes_incremental.t
Biblio.t
Biblio2.t
Budgets.t
Charset.t
Circulation_barcodedecode.t
ClassSortRoutine.t
ClassSortRoutine_Dewey.t
ClassSortRoutine_Generic.t
ClassSortRoutine_LCC.t
ClassSource.t
Context.t
Contract.t
CookieManager.t
Creators.t
DateUtils.t
dummy.t
Edifact.t
EdiInvoice.t
Ediorder.t
Ediordrsp.t
Form_MessagingPreferences.t
HtmlTags.t
ImportBatch.t
Installer_PerlModules.t
ItemCirculationAlertPreference.t
Koha_MetadataRecord.t
Koha_SearchEngine_Elasticsearch_Browse.t
Koha_Template_Plugin_HtmlId.t
Koha_Template_Plugin_Koha.t
Koha_Util_FrameworkPlugin.t
Koha_Util_MARC.t
Koha_XSLT_HTTPS.t
Labels.t
Labels_split_ccn.t
Labels_split_ddcn.t
Labels_split_lccn.t
Labels_split_Regex.t
Languages.t
Logger.t Bug 35907: Add ability to log all custom report runs with or without query 2024-05-10 16:45:45 +02:00
Makefile.t
Members_Messaging.t
OpenLibrarySearch.t
Output.t
Output_JSONStream.t
Patroncards.t
Patroncards_Batch.t
Patroncards_Lib.t
Patroncards_Patroncard.t
Patroncards_Profile.t
Patroncards_Template.t
RecordProcessor.t
Ris.t
Scheduler.t
Scrubber.t
Search.t
Search_PazPar2.t
SimpleMARC.t Bug 36515: (QA follow-up) Tidy code 2024-08-02 19:00:05 +02:00
SMS.t
SuggestionEngine.t
SuggestionEngine_AuthorityFile.t
template_filters.t
timezones.t
TmplToken.t
Token.t Bug 36367: Fix test t/Token.t 2024-06-14 11:17:19 +01:00