From 068557faaa0aef24d28f7589f2b6d52312694832 Mon Sep 17 00:00:00 2001 From: Victor Grousset/tuxayo Date: Wed, 7 Jul 2021 02:00:37 +0200 Subject: [PATCH] Bug 28647: Wait for elements to load + do twice an unreliable operation Confirmed by 1000 passing runs. After testing: removing any of the 3 fixes almost surely causes a fail in less than 200 runs. --- t/db_dependent/selenium/administration_tasks.t | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/db_dependent/selenium/administration_tasks.t b/t/db_dependent/selenium/administration_tasks.t index 080bb38912..342873e254 100755 --- a/t/db_dependent/selenium/administration_tasks.t +++ b/t/db_dependent/selenium/administration_tasks.t @@ -127,6 +127,7 @@ SKIP: { $s->submit_form; # Select "Show all" in the datatable "Show x entries" dropdown list to make sure our library is not hidden + $driver->find_element_by_css("[href*='$branchcode']"); # ensure page is loaded $s->show_all_entries('//div[@id="libraries_wrapper"]'); $s->click( { @@ -138,6 +139,7 @@ SKIP: { $s->submit_form; # Select "Show all" in the datatable "Show x entries" dropdown list to make sure our library is not hidden + $driver->find_element_by_css("#delete_library_".$branchcode); # ensure page is loaded $s->show_all_entries('//div[@id="libraries_wrapper"]'); $s->click( { @@ -185,6 +187,7 @@ SKIP: { { # Patron categories $driver->get($mainpage); + $driver->get($mainpage); # HACK: outrageous but every few dozen runs, it just won't go to the main page. $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 $s->click( { href => '/admin/categories.pl?op=add_form', main_class => 'main container-fluid' } ); # New patron category -- 2.32.0