Bug 23493: Fix selenium/regressions.t

One test wants to make sure thead, tfoot and tbody will have th/td's
with the same size/number.
Existing test for tbody was retrieving the grouped td, which has a
colspan of 100%. Note that this 100% value seems to be wrong as it is
interpreted like "100" by the browser. We do not want to test this row
anyway, but the real row, the one with all the td's.

This patch makes it retrieve the second tr and count the number of td it
has.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2020-01-30 10:20:25 +01:00 committed by Martin Renvoize
parent b3215b4482
commit d2931e6850
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 2 additions and 2 deletions

View File

@ -181,9 +181,9 @@ subtest 'Display circulation table correctly' => sub {
my $tfoot_length = 0;
$tfoot_length += $_->get_attribute('colspan') || 0 for @tfoot_td;
my @tbody_td = $driver->find_elements('//table[@id="issues-table"]/tbody/tr/td');
my @tbody_td = $driver->find_elements('//table[@id="issues-table"]/tbody/tr[2]/td');
my $tbody_length = 0;
$tbody_length += $_->get_attribute('colspan') || 0 for @tbody_td;
$tbody_length += 1 for @tbody_td;
is( $thead_length == $tfoot_length && $tfoot_length == $tbody_length,
1, "Checkouts table must be correctly aligned" )