|
Lines 87-92
sub setup {
Link Here
|
| 87 |
value => { |
87 |
value => { |
| 88 |
surname => "test_patron_" . $i++, |
88 |
surname => "test_patron_" . $i++, |
| 89 |
firstname => $firstname, |
89 |
firstname => $firstname, |
|
|
90 |
middle_name => q{}, # We don't want to copy the logic from patron_to_html |
| 91 |
othernames => q{}, |
| 90 |
categorycode => $patron_category->categorycode, |
92 |
categorycode => $patron_category->categorycode, |
| 91 |
branchcode => $library->branchcode, |
93 |
branchcode => $library->branchcode, |
| 92 |
borrowernotes => $borrowernotes, |
94 |
borrowernotes => $borrowernotes, |
|
Lines 103-108
sub setup {
Link Here
|
| 103 |
value => { |
105 |
value => { |
| 104 |
surname => "test", |
106 |
surname => "test", |
| 105 |
firstname => "not_p_a_t_r_o_n", # won't match 'patron' |
107 |
firstname => "not_p_a_t_r_o_n", # won't match 'patron' |
|
|
108 |
middle_name => q{}, # We don't want to copy the logic from patron_to_html |
| 109 |
othernames => q{}, |
| 106 |
categorycode => $patron_category->categorycode, |
110 |
categorycode => $patron_category->categorycode, |
| 107 |
branchcode => $library->branchcode, |
111 |
branchcode => $library->branchcode, |
| 108 |
borrowernotes => $borrowernotes, |
112 |
borrowernotes => $borrowernotes, |
|
Lines 126-131
sub setup {
Link Here
|
| 126 |
value => { |
130 |
value => { |
| 127 |
surname => "test_patron_27", |
131 |
surname => "test_patron_27", |
| 128 |
firstname => $firstname, |
132 |
firstname => $firstname, |
|
|
133 |
middle_name => q{}, # We don't want to copy the logic from patron_to_html |
| 134 |
othernames => q{}, |
| 129 |
categorycode => $patron_category->categorycode, |
135 |
categorycode => $patron_category->categorycode, |
| 130 |
branchcode => $library_2->branchcode, |
136 |
branchcode => $library_2->branchcode, |
| 131 |
borrowernotes => $borrowernotes, |
137 |
borrowernotes => $borrowernotes, |
|
Lines 252-259
subtest 'Search patrons' => sub {
Link Here
|
| 252 |
is( |
258 |
is( |
| 253 |
$driver->get_title, |
259 |
$driver->get_title, |
| 254 |
sprintf( |
260 |
sprintf( |
| 255 |
"Modify patron %s %s %s (%s) %s (%s) (%s) › Patrons › Koha", |
261 |
"Modify patron %s %s %s (%s) (%s) › Patrons › Koha", |
| 256 |
$first_patron->title, $first_patron->firstname, $first_patron->middle_name, $first_patron->othernames, $first_patron->surname, $first_patron->cardnumber, |
262 |
$first_patron->title, $first_patron->firstname, $first_patron->surname, $first_patron->cardnumber, |
| 257 |
$first_patron->category->description, |
263 |
$first_patron->category->description, |
| 258 |
), |
264 |
), |
| 259 |
'Page title is correct after following modification link' |
265 |
'Page title is correct after following modification link' |
|
Lines 493-499
subtest 'Search patrons in modal' => sub {
Link Here
|
| 493 |
is( |
499 |
is( |
| 494 |
$driver->find_element('//div[@id="patron_preview_modal"]//h1')->get_text(), |
500 |
$driver->find_element('//div[@id="patron_preview_modal"]//h1')->get_text(), |
| 495 |
sprintf( |
501 |
sprintf( |
| 496 |
"%s %s %s (%s) %s (%s)", $patron->title, $patron->firstname, $patron->middle_name, $patron->othernames, |
502 |
"%s %s %s (%s)", $patron->title, $patron->firstname, |
| 497 |
$patron->surname, $patron->cardnumber |
503 |
$patron->surname, $patron->cardnumber |
| 498 |
) |
504 |
) |
| 499 |
); |
505 |
); |
|
Lines 577-584
subtest 'Search patrons in modal' => sub {
Link Here
|
| 577 |
is( |
583 |
is( |
| 578 |
$driver->find_element('//div[@id="patron_preview_modal"]//h1')->get_text(), |
584 |
$driver->find_element('//div[@id="patron_preview_modal"]//h1')->get_text(), |
| 579 |
sprintf( |
585 |
sprintf( |
| 580 |
"%s %s %s (%s) %s (%s)", $patron->title, $patron->firstname, $patron->middle_name, $patron->othernames, |
586 |
"%s %s %s (%s)", $patron->title, $patron->firstname, |
| 581 |
$patron->surname, $patron->cardnumber |
587 |
$patron->surname, $patron->cardnumber |
| 582 |
) |
588 |
) |
| 583 |
); |
589 |
); |
| 584 |
|
590 |
|
|
Lines 639-645
subtest 'Search patrons in modal' => sub {
Link Here
|
| 639 |
is( |
645 |
is( |
| 640 |
$driver->find_element('//div[@id="patron_preview_modal"]//h1')->get_text(), |
646 |
$driver->find_element('//div[@id="patron_preview_modal"]//h1')->get_text(), |
| 641 |
sprintf( |
647 |
sprintf( |
| 642 |
"%s %s %s (%s) %s (%s)", $patron->title, $patron->firstname, $patron->middle_name, $patron->othernames, |
648 |
"%s %s %s (%s)", $patron->title, $patron->firstname, |
| 643 |
$patron->surname, $patron->cardnumber |
649 |
$patron->surname, $patron->cardnumber |
| 644 |
) |
650 |
) |
| 645 |
); |
651 |
); |
|
Lines 662-668
subtest 'Search patrons in modal' => sub {
Link Here
|
| 662 |
|
668 |
|
| 663 |
# Info has been added about the patron |
669 |
# Info has been added about the patron |
| 664 |
is( |
670 |
is( |
| 665 |
$driver->find_element('//div[@id="patron_search_modal_users"]//div[@class="info"]')->get_text, |
671 |
$driver->find_element('//div[@id="patron_search_modal_users"]//div[@class="info dialog message"]')->get_text, |
| 666 |
sprintf( "Patron '%s %s' added.", $patron->firstname, $patron->surname ) |
672 |
sprintf( "Patron '%s %s' added.", $patron->firstname, $patron->surname ) |
| 667 |
); |
673 |
); |
| 668 |
|
674 |
|
|
Lines 674-680
subtest 'Search patrons in modal' => sub {
Link Here
|
| 674 |
|
680 |
|
| 675 |
# Warning has been added about the patron |
681 |
# Warning has been added about the patron |
| 676 |
is( |
682 |
is( |
| 677 |
$driver->find_element('//div[@id="patron_search_modal_users"]//div[@class="error"]')->get_text, |
683 |
$driver->find_element('//div[@id="patron_search_modal_users"]//div[@class="error dialog alert"]')->get_text, |
| 678 |
sprintf( "Patron '%s %s' is already in the list.", $patron->firstname, $patron->surname ) |
684 |
sprintf( "Patron '%s %s' is already in the list.", $patron->firstname, $patron->surname ) |
| 679 |
); |
685 |
); |
| 680 |
|
686 |
|
| 681 |
- |
|
|