From d2931e68501901cb89cd1ece9cc23bb8cde39b60 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 30 Jan 2020 10:20:25 +0100 Subject: [PATCH] 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 --- t/db_dependent/selenium/regressions.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/selenium/regressions.t b/t/db_dependent/selenium/regressions.t index 1fec63172b..ed2a68cdd4 100644 --- a/t/db_dependent/selenium/regressions.t +++ b/t/db_dependent/selenium/regressions.t @@ -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" ) -- 2.39.5