Lines 59-68
subtest 'OPAC - borrowernumber and branchcode as html attributes' => sub {
Link Here
|
59 |
$patron->set_password({ password => $password }); |
59 |
$patron->set_password({ password => $password }); |
60 |
$s->opac_auth( $patron->userid, $password ); |
60 |
$s->opac_auth( $patron->userid, $password ); |
61 |
my $elt = $driver->find_element('//span[@class="loggedinusername"]'); |
61 |
my $elt = $driver->find_element('//span[@class="loggedinusername"]'); |
62 |
is( $elt->get_attribute('data-branchcode'), $patron->library->branchcode, |
62 |
is( $elt->get_attribute('data-branchcode', 1), $patron->library->branchcode, |
63 |
"Since bug 20921 span.loggedinusername should contain data-branchcode" |
63 |
"Since bug 20921 span.loggedinusername should contain data-branchcode" |
|
|
64 |
# No idea why we need the second param of get_attribute(). As |
65 |
# data-branchcode is still there after page finished loading. |
64 |
); |
66 |
); |
65 |
is( $elt->get_attribute('data-borrowernumber'), $patron->borrowernumber, |
67 |
is( $elt->get_attribute('data-borrowernumber', 1), $patron->borrowernumber, |
66 |
"Since bug 20921 span.loggedinusername should contain data-borrowernumber" |
68 |
"Since bug 20921 span.loggedinusername should contain data-borrowernumber" |
67 |
); |
69 |
); |
68 |
push @cleanup, $patron, $patron->category, $patron->library; |
70 |
push @cleanup, $patron, $patron->category, $patron->library; |
Lines 168-178
subtest 'Display circulation table correctly' => sub {
Link Here
|
168 |
|
170 |
|
169 |
my @thead_th = $driver->find_elements('//table[@id="issues-table"]/thead/tr/th'); |
171 |
my @thead_th = $driver->find_elements('//table[@id="issues-table"]/thead/tr/th'); |
170 |
my $thead_length = 0; |
172 |
my $thead_length = 0; |
171 |
$thead_length += $_->get_attribute('colspan') || 0 for @thead_th; |
173 |
$thead_length += $_->get_attribute('colspan', 1) || 0 for @thead_th; |
172 |
|
174 |
|
173 |
my @tfoot_td = $driver->find_elements('//table[@id="issues-table"]/tfoot/tr/td'); |
175 |
my @tfoot_td = $driver->find_elements('//table[@id="issues-table"]/tfoot/tr/td'); |
174 |
my $tfoot_length = 0; |
176 |
my $tfoot_length = 0; |
175 |
$tfoot_length += $_->get_attribute('colspan') || 0 for @tfoot_td; |
177 |
$tfoot_length += $_->get_attribute('colspan', 1) || 0 for @tfoot_td; |
176 |
|
178 |
|
177 |
my @tbody_td = $driver->find_elements('//table[@id="issues-table"]/tbody/tr[2]/td'); |
179 |
my @tbody_td = $driver->find_elements('//table[@id="issues-table"]/tbody/tr[2]/td'); |
178 |
my $tbody_length = 0; |
180 |
my $tbody_length = 0; |