Lines 263-269
sub test_search{
Link Here
|
263 |
return sprintf( "===DIAG===\n%s is %s\n%s %s\n==========", $pref, C4::Context->preference($pref), $xslt_filepath, ( -f $xslt_filepath ? 'exists' : 'does not exist' )); |
263 |
return sprintf( "===DIAG===\n%s is %s\n%s %s\n==========", $pref, C4::Context->preference($pref), $xslt_filepath, ( -f $xslt_filepath ? 'exists' : 'does not exist' )); |
264 |
}; |
264 |
}; |
265 |
|
265 |
|
266 |
like( $intra_text, qr|Publisher: $publisher|, ) or diag($diag->()); |
266 |
like( $intra_text, qr|Publication details: $publisher|, ) or diag($diag->()); |
267 |
|
267 |
|
268 |
$agent->get_ok( "$intranet/cgi-bin/koha/catalogue/search.pl" , "got search on intranet"); |
268 |
$agent->get_ok( "$intranet/cgi-bin/koha/catalogue/search.pl" , "got search on intranet"); |
269 |
$agent->form_number(5); |
269 |
$agent->form_number(5); |
Lines 272-278
sub test_search{
Link Here
|
272 |
$agent->click(); |
272 |
$agent->click(); |
273 |
$intra_text = $agent->text(); |
273 |
$intra_text = $agent->text(); |
274 |
|
274 |
|
275 |
like( $intra_text, qr|Publisher: $publisher|, ); |
275 |
like( $intra_text, qr|Publication details: $publisher|, ); |
276 |
my $expected_base = q|search.pl\?advsearch=1&idx=kw&q=| . uri_escape_utf8( $publisher ); |
276 |
my $expected_base = q|search.pl\?advsearch=1&idx=kw&q=| . uri_escape_utf8( $publisher ); |
277 |
$agent->base_like(qr|$expected_base|, ); |
277 |
$agent->base_like(qr|$expected_base|, ); |
278 |
|
278 |
|
Lines 286-292
sub test_search{
Link Here
|
286 |
$agent->field( 'idx', '' ); |
286 |
$agent->field( 'idx', '' ); |
287 |
$agent->click( ); |
287 |
$agent->click( ); |
288 |
my $opac_text = $agent->text() ; |
288 |
my $opac_text = $agent->text() ; |
289 |
like( $opac_text, qr|Publisher: $publisher|, ); |
289 |
like( $opac_text, qr|Publication details: $publisher|, ); |
290 |
|
290 |
|
291 |
$agent->get_ok( "$opac" , "got opac"); |
291 |
$agent->get_ok( "$opac" , "got opac"); |
292 |
$agent->form_name('searchform'); |
292 |
$agent->form_name('searchform'); |
Lines 295-301
sub test_search{
Link Here
|
295 |
$agent->click(); |
295 |
$agent->click(); |
296 |
$opac_text = $agent->text(); |
296 |
$opac_text = $agent->text(); |
297 |
|
297 |
|
298 |
like( $opac_text, qr|Publisher: $publisher|, ); |
298 |
like( $opac_text, qr|Publication details: $publisher|, ); |
299 |
$expected_base = q|opac-search.pl\?(idx=&)?q=| . uri_escape_utf8( $publisher ); |
299 |
$expected_base = q|opac-search.pl\?(idx=&)?q=| . uri_escape_utf8( $publisher ); |
300 |
$agent->base_like(qr|$expected_base|, ); |
300 |
$agent->base_like(qr|$expected_base|, ); |
301 |
# Test added on BZ 14909 in addition to making the empty idx= optional |
301 |
# Test added on BZ 14909 in addition to making the empty idx= optional |
302 |
- |
|
|