From 6902efac2263d839f6468b62a18baf0182d81e38 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 26 Mar 2020 09:59:32 +0100 Subject: [PATCH] Bug 24801: Display all the libraries - Selenium fix Same as for categories. 22:41:28 koha_1 | STRACE: /usr/share/perl5/Try/Tiny.pm:104 in Selenium::Remote::Driver::catch {...} 22:41:28 koha_1 | /usr/local/share/perl/5.20.2/Selenium/Remote/Driver.pm:353 in Try::Tiny::try 22:41:28 koha_1 | (eval 1337):1 in Selenium::Remote::Driver::__ANON__ 22:41:28 koha_1 | (eval 1339):2 in Selenium::Remote::Driver::__ANON__ 22:41:28 koha_1 | /usr/local/share/perl/5.20.2/Selenium/Remote/Driver.pm:1330 in Selenium::Remote::Driver::_execute_command 22:41:28 koha_1 | /usr/local/share/perl/5.20.2/Selenium/Remote/Driver.pm:1330 in (eval) 22:41:28 koha_1 | /kohadevbox/koha/t/lib/Selenium.pm:174 in Selenium::Remote::Driver::find_element 22:41:28 koha_1 | /kohadevbox/koha/t/lib/Selenium.pm:166 in t::lib::Selenium::click_when_visible 22:41:28 koha_1 | t/db_dependent/selenium/administration_tasks.t:128 in t::lib::Selenium::click 22:41:28 koha_1 | 22:41:28 selenium_1 | 14:41:28.273 INFO - Executing: [take screenshot]) 22:41:28 selenium_1 | 14:41:28.873 INFO - Done: [take screenshot] 22:41:31 koha_1 | 22:41:31 koha_1 | SCREENSHOT: https://framapic.org/0nvX5dhLHpU1/tAEnENSeLRXB 22:41:31 koha_1 | An element could not be located on the page using the given search parameters: //div[@class="main container-fluid"]//a[contains(@href, "/admin/branches.pl?op=add_form&branchcode=UT_BC")],xpath at /kohadevbox/koha/t/lib/Selenium.pm line 174. The screenshot was obvious, the UT_BC was not on the first page. There was a total of 33 libraries at this point, which is not expected, maybe data not deleted from previous selenium tests. Signed-off-by: Martin Renvoize --- 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 fb02627394..b3c3bbf2c3 100644 --- a/t/db_dependent/selenium/administration_tasks.t +++ b/t/db_dependent/selenium/administration_tasks.t @@ -125,6 +125,9 @@ SKIP: { ; # New library $s->fill_form( { branchcode => $branchcode, branchname => 'my library' } ); $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('//select[@name="libraries_length"]/option[@value="-1"]')->click; $s->click( { href => '/admin/branches.pl?op=add_form&branchcode=' . $branchcode, -- 2.39.5