@@ -, +, @@ and onboarding tool --- t/db_dependent/selenium/installkoha.t | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) --- a/t/db_dependent/selenium/installkoha.t +++ a/t/db_dependent/selenium/installkoha.t @@ -17,8 +17,8 @@ # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -#This selenium test is to testb authentication, by performing the following: create a category and patron (same as basic_workflow.t). Then the superlibrarian logs out and the created patron must log into the staff intranet and OPAC - +#This selenium test is to test the Koha web installer and onboarding tool. Before running the test make sure you have restarted memcached and have dropped and recreated the Koha database. +#Note: When running the test database errors will be displayed however just ignore those errors and the test output will be displayed below it # wget https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar # Does not work with 3.4, did not test the ones between # sudo apt-get install xvfb firefox-esr # SELENIUM_PATH=/home/vagrant/selenium-server-standalone-2.53.1.jar @@ -45,7 +45,7 @@ use Time::HiRes qw(gettimeofday); use C4::Context; use C4::Biblio qw( AddBiblio ); # We shouldn't use it -use Test::More tests => 9; +use Test::More tests => 1; use MARC::Record; use MARC::Field; @@ -102,7 +102,8 @@ SKIP: { time_diff("Selected english language"); $driver->maximize_window(); - $driver->set_implicit_wait_timeout(30000); + $driver->pause(50000); + warn $driver->get_title(); #Check perl dependencies $driver->find_element_by_xpath('/html/body/div/div/div/form/p/input')->click(); time_diff("Continued through checking perl dependencies"); @@ -122,10 +123,10 @@ SKIP: { time_diff("Basic configs installed"); $driver->maximize_window(); - $driver->set_implicit_wait_timeout(30000); -#Select MARC flavour - warn $driver->is_displayed_by_xpath('/html/body/div/div/div/form/p[4]/input')->click(); - $driver->find_element_by_xpath('/html/body/div/div/div/form/p[4]/input')->click(); + $driver->pause(50000); +#Select MARC flavour + warn $driver->get_title(); + $driver->find_element('//input[@value="Continue to the next step"]')->click; time_diff("MARC21 installed"); #Install default settings @@ -138,6 +139,8 @@ SKIP: { time_diff("Start onboarding tool"); #Onboarding tool create a library + $driver->pause(50000); + warn $driver->get_title(); $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol/li[1]/input')->send_keys("Test"); $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol/li[2]/input')->send_keys("Test library"); $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/input[3]')->click(); @@ -147,18 +150,19 @@ SKIP: { $driver->find_element_by_xpath('/html/body/div[1]/div/div/form/fieldset/ol/li[1]/input')->send_keys("PAT"); $driver->find_element_by_xpath('/html/body/div[1]/div/div/form/fieldset/ol/li[2]/input')->send_keys("Test patron category"); $driver->find_element_by_xpath('/html/body/div[1]/div/div/form/fieldset/ol/li[6]/fieldset/ol/li[3]/input')->send_keys('07/29/2020'); - $driver->find_element_by_xpath('/html/body/div[1]/div/div/form/fieldset/p')->click(); + $driver->find_element_by_xpath('/html/body/div[1]/div/div/form/fieldset/input[3]')->click; time_diff("Patron category created"); $driver->set_window_size(1000, 1000); $driver->maximize_window(); - $driver->set_implicit_wait_timeout(20000); #Onboarding tool Create Koha adminstrator patron - $driver->mouse_move_to_location(xoffset => 100, yoffset => 100); + $driver->pause(50000); + warn $driver->get_title(); $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[1]/li[1]/input')->send_keys("Smith"); $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[1]/li[2]/input')->send_keys("Mary"); - $driver->mouse_move_to_location(xoffset => 200, yoffset => 200); - $driver->maximize_window(); + + $driver->pause(50000); + warn $driver->get_title(); $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[2]/li[1]/input')->send_keys("10203"); $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[4]/li[1]/input')->send_keys("Mary"); $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[4]/li[2]/input')->send_keys("password"); --