Bugzilla – Attachment 153324 Details for
Bug 34094
Apply DefaultPatronSearchMethod to all patron search forms
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34094: (follow-up) Fix failing unit test
Bug-34094-follow-up-Fix-failing-unit-test.patch (text/plain), 1.98 KB, created by
Martin Renvoize (ashimema)
on 2023-07-11 13:28:13 UTC
(
hide
)
Description:
Bug 34094: (follow-up) Fix failing unit test
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-07-11 13:28:13 UTC
Size:
1.98 KB
patch
obsolete
>From 1c8b4ccdaaadc9e2a135d800aeef23bbf1ebfc22 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 11 Jul 2023 14:26:46 +0100 >Subject: [PATCH] Bug 34094: (follow-up) Fix failing unit test > >The unit tests were written to assume we always do a 'contains' search, >but the new system preference allows for 'starts_with' or 'contains'. > >As such, for the tests to pass, we need to explicitly mock the >preference to 'contains' >--- > t/db_dependent/selenium/patrons_search.t | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/t/db_dependent/selenium/patrons_search.t b/t/db_dependent/selenium/patrons_search.t >index 3af2e6bf12..a9170f7cc8 100755 >--- a/t/db_dependent/selenium/patrons_search.t >+++ b/t/db_dependent/selenium/patrons_search.t >@@ -74,6 +74,7 @@ subtest 'Search patrons' => sub { > { class => 'Koha::Libraries', value => { branchname => $branchname } } > ); > my $default_patron_search_fields = C4::Context->preference('DefaultPatronSearchFields'); >+ my $default_patron_search_method = C4::Context->preference('DefaultPatronSearchMethod'); > my $default_patron_per_page = C4::Context->preference('PatronsPerPage'); > for my $i ( 1 .. 25 ) { > push @patrons, >@@ -155,6 +156,7 @@ subtest 'Search patrons' => sub { > > $s->auth; > C4::Context->set_preference('DefaultPatronSearchFields',""); >+ C4::Context->set_preference('DefaultPatronSearchMethod',"contains"); > my $PatronsPerPage = 15; > my $nb_standard_fields = 13; > C4::Context->set_preference('PatronsPerPage', $PatronsPerPage); >@@ -335,6 +337,7 @@ subtest 'Search patrons' => sub { > push @cleanup, $patron_category; > push @cleanup, $attribute_type, $attribute_type_searchable; > C4::Context->set_preference('DefaultPatronSearchFields',$default_patron_search_fields); >+ C4::Context->set_preference('DefaultPatronSearchMethod',$default_patron_search_method); > C4::Context->set_preference('PatronsPerPage',$default_patron_per_page); > > $driver->quit(); >-- >2.41.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34094
:
152567
|
152726
|
152742
|
152787
|
152827
|
152828
|
152881
| 153324