From 26dd4002835ebe4361c145375b875fcb31c87ab7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 15 Nov 2021 15:04:06 +0100 Subject: [PATCH] Bug 29485: Trying to prevent administration_tasks.t to fail randomly Since bug 19185, and Koha_Master running the tests after t/db_dependent/selenium/01-installation.t is ran, t/db_dependent/selenium/administration_tasks.t is failing randomly with: 12:32:59 koha_1 | STRACE: /usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...} 12:32:59 koha_1 | /usr/local/share/perl/5.28.1/Selenium/Remote/Driver.pm:361 in Try::Tiny::try 12:32:59 koha_1 | (eval 1710):1 in Selenium::Remote::Driver::__ANON__ 12:32:59 koha_1 | (eval 1712):2 in Selenium::Remote::Driver::__ANON__ 12:32:59 koha_1 | /usr/local/share/perl/5.28.1/Selenium/Remote/Driver.pm:1340 in Selenium::Remote::Driver::_execute_command 12:32:59 koha_1 | /usr/local/share/perl/5.28.1/Selenium/Remote/Driver.pm:1340 in (eval) 12:32:59 koha_1 | /kohadevbox/koha/t/lib/Selenium.pm:170 in Selenium::Remote::Driver::find_element 12:32:59 koha_1 | t/db_dependent/selenium/administration_tasks.t:188 in t::lib::Selenium::click I don't recreate it locally. The screenshot of the failure shows that the screen is still on the authorised value list view. This does not make a lot of sense, but I am failing to find a logic here. Signed-off-by: Jonathan Druart --- t/db_dependent/selenium/administration_tasks.t | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/t/db_dependent/selenium/administration_tasks.t b/t/db_dependent/selenium/administration_tasks.t index 080bb38912..f46bbad412 100755 --- a/t/db_dependent/selenium/administration_tasks.t +++ b/t/db_dependent/selenium/administration_tasks.t @@ -184,6 +184,11 @@ SKIP: { }; { # Patron categories + # For an unknown reason the click on the admin-home link does not work + # At this point we were still on the authorised value list view. + # A workaround (and dirty fix) is to logout/login and see if it fixes the problem + $driver->get( $mainpage . q|?logout.x=1| ); + $s->auth; $driver->get($mainpage); $s->click( { href => '/admin/admin-home.pl', main => 'container-main' } ); # Koha administration $s->click( { href => '/admin/categories.pl', main_class => 'main container-fluid' } ); # Patron categories -- 2.39.5