Lines 40-51
my $builder = t::lib::TestBuilder->new;
Link Here
|
40 |
|
40 |
|
41 |
our @cleanup; |
41 |
our @cleanup; |
42 |
subtest 'Search patrons' => sub { |
42 |
subtest 'Search patrons' => sub { |
43 |
plan tests => 3; |
43 |
plan tests => 4; |
44 |
|
44 |
|
45 |
my @patrons; |
45 |
my @patrons; |
46 |
my $borrowernotes = q|<strong>just 'a" note</strong> \123 ❤|; |
46 |
my $borrowernotes = q|<strong>just 'a" note</strong> \123 ❤|; |
47 |
my $borrowernotes_displayed = q|just 'a" note \123 ❤|; |
47 |
my $borrowernotes_displayed = q|just 'a" note \123 ❤|; |
48 |
my $branchname = q|<strong>just 'another" library</strong> \123 ❤|; |
48 |
my $branchname = q|<strong>just 'another" library</strong> \123 ❤|; |
|
|
49 |
my $firstname = q|<strong>fir's"tname</strong> \123 ❤|; |
49 |
my $patron_category = $builder->build_object( |
50 |
my $patron_category = $builder->build_object( |
50 |
{ class => 'Koha::Patron::Categories', category_type => 'A' } ); |
51 |
{ class => 'Koha::Patron::Categories', category_type => 'A' } ); |
51 |
my $library = $builder->build_object( |
52 |
my $library = $builder->build_object( |
Lines 58-63
subtest 'Search patrons' => sub {
Link Here
|
58 |
class => 'Koha::Patrons', |
59 |
class => 'Koha::Patrons', |
59 |
value => { |
60 |
value => { |
60 |
surname => "test_patron_" . $i++, |
61 |
surname => "test_patron_" . $i++, |
|
|
62 |
firstname => $firstname, |
61 |
categorycode => $patron_category->categorycode, |
63 |
categorycode => $patron_category->categorycode, |
62 |
branchcode => $library->branchcode, |
64 |
branchcode => $library->branchcode, |
63 |
borrowernotes => $borrowernotes, |
65 |
borrowernotes => $borrowernotes, |
Lines 73-78
subtest 'Search patrons' => sub {
Link Here
|
73 |
my $first_patron = $patrons[0]; |
75 |
my $first_patron = $patrons[0]; |
74 |
|
76 |
|
75 |
my @td = $driver->find_elements('//table[@id="memberresultst"]/tbody/tr/td'); |
77 |
my @td = $driver->find_elements('//table[@id="memberresultst"]/tbody/tr/td'); |
|
|
78 |
like ($td[2]->get_text, qr[\Q$firstname\E], |
79 |
'Column "Name" should be the 3rd and contain the firstname correctly filtered' |
80 |
); |
76 |
is( $td[5]->get_text, $branchname, |
81 |
is( $td[5]->get_text, $branchname, |
77 |
'Column "Library" should be the 6th and contain the html tags - they have been html filtered' |
82 |
'Column "Library" should be the 6th and contain the html tags - they have been html filtered' |
78 |
); |
83 |
); |
79 |
- |
|
|