Browse Source

Bug 29485: (follow-up) Trying to prevent administration_tasks.t to fail randomly

Recreated the problem after run #47
Error while executing command: no such element: Unable to locate element: //*[@id="userid"] at /usr/local/share/perl/5.28.1/Selenium/Remote/Driver.pm line 411.

With this patch I do not longer recreate the failure. It's ugly but,
well, I don't have any other solutions. It seems that the accept_alert
is taking too long and is async (??)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.11.x
Jonathan Druart 2 years ago
parent
commit
65edbe5af2
  1. 10
      t/db_dependent/selenium/administration_tasks.t

10
t/db_dependent/selenium/administration_tasks.t

@ -181,14 +181,14 @@ SKIP: {
}
);
$s->driver->accept_alert; # Accept the modal "Are you sure you want to delete this authorized value?"
# For an unknown reason the click on the next admin-home link does not work
# We were still on the authorised value list view.
# A workaround (and dirty fix) is to wait for 1 second and see if it fixes the problem
sleep 1;
};
{ # 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

Loading…
Cancel
Save