Lines 165-171
subtest 'Search patrons' => sub {
Link Here
|
165 |
C4::Context->set_preference('DefaultPatronSearchFields',""); |
165 |
C4::Context->set_preference('DefaultPatronSearchFields',""); |
166 |
C4::Context->set_preference('DefaultPatronSearchMethod',"contains"); |
166 |
C4::Context->set_preference('DefaultPatronSearchMethod',"contains"); |
167 |
my $PatronsPerPage = 15; |
167 |
my $PatronsPerPage = 15; |
168 |
my $nb_standard_fields = 13; |
168 |
my $nb_standard_fields = 14; # Standard fields, plus one searchable attribute |
169 |
C4::Context->set_preference('PatronsPerPage', $PatronsPerPage); |
169 |
C4::Context->set_preference('PatronsPerPage', $PatronsPerPage); |
170 |
$driver->get( $base_url . "/members/members-home.pl" ); |
170 |
$driver->get( $base_url . "/members/members-home.pl" ); |
171 |
my @adv_options = $driver->find_elements('//select[@id="searchfieldstype"]/option'); |
171 |
my @adv_options = $driver->find_elements('//select[@id="searchfieldstype"]/option'); |
Lines 182-188
subtest 'Search patrons' => sub {
Link Here
|
182 |
@filter_options = $driver->find_elements('//select[@id="searchfieldstype_filter"]/option'); |
182 |
@filter_options = $driver->find_elements('//select[@id="searchfieldstype_filter"]/option'); |
183 |
is( scalar @filter_options, $nb_standard_fields, 'New filter option added when DefaultPatronSearchFields is populated with a field'); |
183 |
is( scalar @filter_options, $nb_standard_fields, 'New filter option added when DefaultPatronSearchFields is populated with a field'); |
184 |
is( $filter_options[0]->get_value(), 'standard', 'Standard filter uses value "standard"'); |
184 |
is( $filter_options[0]->get_value(), 'standard', 'Standard filter uses value "standard"'); |
185 |
C4::Context->set_preference('DefaultPatronSearchFields',"firstname|initials|horses"); |
|
|
186 |
$driver->get( $base_url . "/members/members-home.pl" ); |
185 |
$driver->get( $base_url . "/members/members-home.pl" ); |
187 |
@adv_options = $driver->find_elements('//select[@id="searchfieldstype"]/option'); |
186 |
@adv_options = $driver->find_elements('//select[@id="searchfieldstype"]/option'); |
188 |
@filter_options = $driver->find_elements('//select[@id="searchfieldstype_filter"]/option'); |
187 |
@filter_options = $driver->find_elements('//select[@id="searchfieldstype_filter"]/option'); |
189 |
- |
|
|