Bugzilla – Attachment 174576 Details for
Bug 38444
Bug 34147 follow-up: add tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38444: Unit test to ensure limited categories don't break display
Bug-38444-Unit-test-to-ensure-limited-categories-d.patch (text/plain), 3.10 KB, created by
David Nind
on 2024-11-15 13:10:57 UTC
(
hide
)
Description:
Bug 38444: Unit test to ensure limited categories don't break display
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-11-15 13:10:57 UTC
Size:
3.10 KB
patch
obsolete
>From 18aeeb57fc92e77e788cc8501d9469b053621aa9 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 14 Nov 2024 13:39:20 +0000 >Subject: [PATCH] Bug 38444: Unit test to ensure limited categories don't break > display > >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/selenium/patrons_search.t | 26 ++++++++++++++++++++---- > 1 file changed, 22 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/selenium/patrons_search.t b/t/db_dependent/selenium/patrons_search.t >index 06a4822303..76cadfb10d 100755 >--- a/t/db_dependent/selenium/patrons_search.t >+++ b/t/db_dependent/selenium/patrons_search.t >@@ -62,9 +62,12 @@ my $branchname = q|<strong>just 'another" library</strong> \123 ⤠> my $firstname = q|<strong>fir's"tname</strong> \123 â¤|; > my $address = q|<strong>add'res"s</strong> \123 â¤|; > my $email = q|a<strong>bad_email</strong>@example\123 â¤.com|; >-my ($attribute_type, $attribute_type_searchable_1, $attribute_type_searchable_2, $attribute_type_searchable_not_default); >+my ( >+ $attribute_type, $attribute_type_searchable_1, $attribute_type_searchable_2, >+ $attribute_type_searchable_not_default, $patron_category, $library >+); > sub setup { >- my $patron_category = $builder->build_object( >+ $patron_category = $builder->build_object( > { > class => 'Koha::Patron::Categories', > value => { category_type => 'A' } >@@ -72,7 +75,7 @@ sub setup { > ); > push @cleanup, $patron_category; > >- my $library = $builder->build_object( >+ $library = $builder->build_object( > { class => 'Koha::Libraries', value => { branchname => $branchname } } > ); > push @cleanup, $library; >@@ -207,7 +210,7 @@ sub teardown { > } > > subtest 'Search patrons' => sub { >- plan tests => 28; >+ plan tests => 29; > > setup(); > my $total_number_of_patrons = Koha::Patrons->search->count; >@@ -353,6 +356,21 @@ subtest 'Search patrons' => sub { > sleep $DT_delay && $s->wait_for_ajax; > is( $driver->find_element('//div[@id="'.$table_id.'_wrapper"]//div[@class="dt-info"]')->get_text, sprintf('Showing 1 to %s of %s entries (filtered from %s total entries)', 1, 1, $total_number_of_patrons), 'Refining with header filters works to further filter the original query' ); > >+ subtest 'limited categories' => sub { >+ >+ plan tests => 1; >+ >+ $patron_category->replace_library_limits( [$library->id] ); >+ C4::Context->set_preference( 'PatronsPerPage', 5 ); >+ $driver->get( $base_url . "/members/members-home.pl" ); >+ clear_filters(); >+ $s->fill_form( { 'search_patron_filter' => 'test_patron' } ); >+ $s->submit_form; >+ sleep $DT_delay && $s->wait_for_ajax; >+ is( $driver->find_element('//div[@id="'.$table_id.'_info"]')->get_text, sprintf('Showing 1 to %s of %s entries (filtered from %s total entries)', $PatronsPerPage, 26, $total_number_of_patrons), 'Search works when category of patrons is limited to a library we are not signed in at' ); >+ >+ }; >+ > subtest 'remember_search' => sub { > > plan tests => 7; >-- >2.39.5
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 38444
:
174527
| 174576