Lines 149-156
sub setup {
Link Here
|
149 |
{ |
149 |
{ |
150 |
class => 'Koha::Patrons', |
150 |
class => 'Koha::Patrons', |
151 |
value => { |
151 |
value => { |
152 |
surname => "expired_patron_surname", |
152 |
surname => "test_expired_patron_surname", |
153 |
firstname => 'expired_patron', |
153 |
firstname => 'test_expired_patron', |
154 |
categorycode => $patron_category->categorycode, |
154 |
categorycode => $patron_category->categorycode, |
155 |
branchcode => $library_2->branchcode, |
155 |
branchcode => $library_2->branchcode, |
156 |
dateexpiry => '2000-12-01', |
156 |
dateexpiry => '2000-12-01', |
Lines 316-322
subtest 'Search patrons' => sub {
Link Here
|
316 |
$s->submit_form; |
316 |
$s->submit_form; |
317 |
|
317 |
|
318 |
sleep $DT_delay && $s->wait_for_ajax; |
318 |
sleep $DT_delay && $s->wait_for_ajax; |
319 |
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)', $PatronsPerPage, 26, $total_number_of_patrons) ); |
319 |
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)', $PatronsPerPage, 27, $total_number_of_patrons) ); |
320 |
$driver->find_element('//form[@class="patron_search_form"]//*[@class="btn btn-default clear_search"]')->click(); |
320 |
$driver->find_element('//form[@class="patron_search_form"]//*[@class="btn btn-default clear_search"]')->click(); |
321 |
$s->submit_form; |
321 |
$s->submit_form; |
322 |
sleep $DT_delay && $s->wait_for_ajax; |
322 |
sleep $DT_delay && $s->wait_for_ajax; |
Lines 480-496
subtest 'Search patrons' => sub {
Link Here
|
480 |
subtest 'expired and restricted badges' => sub { |
480 |
subtest 'expired and restricted badges' => sub { |
481 |
plan tests => 5; |
481 |
plan tests => 5; |
482 |
|
482 |
|
483 |
my $patron_28 = Koha::Patrons->search( { surname => 'expired_patron_surname' } )->next; |
483 |
my $patron_28 = Koha::Patrons->search( { surname => 'test_expired_patron_surname' } )->next; |
484 |
|
484 |
|
485 |
$driver->get( $base_url . "/members/members-home.pl" ); |
485 |
$driver->get( $base_url . "/members/members-home.pl" ); |
486 |
$s->fill_form( { 'searchmember' => 'expired_patron' } ); |
486 |
$s->fill_form( { 'searchmember' => 'test_expired_patron' } ); |
487 |
|
487 |
|
488 |
sleep $DT_delay && $s->wait_for_ajax; |
488 |
sleep $DT_delay && $s->wait_for_ajax; |
489 |
|
489 |
|
490 |
like( |
490 |
like( |
491 |
$driver->find_element('//ul[@id="ui-id-2"]/li/a')->get_text, |
491 |
$driver->find_element('//ul[@id="ui-id-2"]/li/a')->get_text, |
492 |
qr[\Qexpired_patron_surname\E], |
492 |
qr[\Qtest_expired_patron_surname\E], |
493 |
'expired_patron is shown' |
493 |
'test_expired_patron is shown' |
494 |
); |
494 |
); |
495 |
|
495 |
|
496 |
is( |
496 |
is( |
Lines 502-508
subtest 'Search patrons' => sub {
Link Here
|
502 |
$patron_28->dateexpiry('2999-12-01')->store; |
502 |
$patron_28->dateexpiry('2999-12-01')->store; |
503 |
|
503 |
|
504 |
$driver->get( $base_url . "/members/members-home.pl" ); |
504 |
$driver->get( $base_url . "/members/members-home.pl" ); |
505 |
$s->fill_form( { 'searchmember' => 'expired_patron' } ); |
505 |
$s->fill_form( { 'searchmember' => 'test_expired_patron' } ); |
506 |
|
506 |
|
507 |
sleep $DT_delay && $s->wait_for_ajax; |
507 |
sleep $DT_delay && $s->wait_for_ajax; |
508 |
|
508 |
|
Lines 515-521
subtest 'Search patrons' => sub {
Link Here
|
515 |
$patron_28->debarred('2048-11-18')->store; |
515 |
$patron_28->debarred('2048-11-18')->store; |
516 |
|
516 |
|
517 |
$driver->get( $base_url . "/members/members-home.pl" ); |
517 |
$driver->get( $base_url . "/members/members-home.pl" ); |
518 |
$s->fill_form( { 'searchmember' => 'expired_patron' } ); |
518 |
$s->fill_form( { 'searchmember' => 'test_expired_patron' } ); |
519 |
|
519 |
|
520 |
sleep $DT_delay && $s->wait_for_ajax; |
520 |
sleep $DT_delay && $s->wait_for_ajax; |
521 |
|
521 |
|
Lines 529-535
subtest 'Search patrons' => sub {
Link Here
|
529 |
$patron_28->dateexpiry('2000-12-01')->store; |
529 |
$patron_28->dateexpiry('2000-12-01')->store; |
530 |
|
530 |
|
531 |
$driver->get( $base_url . "/members/members-home.pl" ); |
531 |
$driver->get( $base_url . "/members/members-home.pl" ); |
532 |
$s->fill_form( { 'searchmember' => 'expired_patron' } ); |
532 |
$s->fill_form( { 'searchmember' => 'test_expired_patron' } ); |
533 |
|
533 |
|
534 |
sleep $DT_delay && $s->wait_for_ajax; |
534 |
sleep $DT_delay && $s->wait_for_ajax; |
535 |
|
535 |
|
536 |
- |
|
|