View | Details | Raw Unified | Return to bug 18974
Collapse All | Expand All

(-)a/t/db_dependent/selenium/installkoha.t (-14 / +17 lines)
Lines 17-24 Link Here
17
# You should have received a copy of the GNU General Public License
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
#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
20
#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. 
21
21
#Note: When running the test database errors will be displayed however just ignore those errors and the test output will be displayed below it
22
# 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
22
# 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
23
# sudo apt-get install xvfb firefox-esr
23
# sudo apt-get install xvfb firefox-esr
24
# SELENIUM_PATH=/home/vagrant/selenium-server-standalone-2.53.1.jar
24
# SELENIUM_PATH=/home/vagrant/selenium-server-standalone-2.53.1.jar
Lines 45-51 use Time::HiRes qw(gettimeofday); Link Here
45
use C4::Context;
45
use C4::Context;
46
use C4::Biblio qw( AddBiblio ); # We shouldn't use it
46
use C4::Biblio qw( AddBiblio ); # We shouldn't use it
47
47
48
use Test::More tests => 9;
48
use Test::More tests => 1;
49
use MARC::Record;
49
use MARC::Record;
50
use MARC::Field;
50
use MARC::Field;
51
51
Lines 102-108 SKIP: { Link Here
102
    time_diff("Selected english language");
102
    time_diff("Selected english language");
103
103
104
    $driver->maximize_window();
104
    $driver->maximize_window();
105
    $driver->set_implicit_wait_timeout(30000);
105
    $driver->pause(50000);
106
    warn $driver->get_title();
106
#Check perl dependencies
107
#Check perl dependencies
107
    $driver->find_element_by_xpath('/html/body/div/div/div/form/p/input')->click();
108
    $driver->find_element_by_xpath('/html/body/div/div/div/form/p/input')->click();
108
    time_diff("Continued through checking perl dependencies");
109
    time_diff("Continued through checking perl dependencies");
Lines 122-131 SKIP: { Link Here
122
    time_diff("Basic configs installed");
123
    time_diff("Basic configs installed");
123
124
124
    $driver->maximize_window();
125
    $driver->maximize_window();
125
    $driver->set_implicit_wait_timeout(30000);
126
    $driver->pause(50000);
126
#Select MARC flavour 
127
#Select MARC flavour
127
    warn $driver->is_displayed_by_xpath('/html/body/div/div/div/form/p[4]/input')->click();
128
    warn $driver->get_title();
128
    $driver->find_element_by_xpath('/html/body/div/div/div/form/p[4]/input')->click();
129
    $driver->find_element('//input[@value="Continue to the next step"]')->click;
129
    time_diff("MARC21 installed");
130
    time_diff("MARC21 installed");
130
131
131
#Install default settings 
132
#Install default settings 
Lines 138-143 SKIP: { Link Here
138
    time_diff("Start onboarding tool");
139
    time_diff("Start onboarding tool");
139
140
140
#Onboarding tool create a library
141
#Onboarding tool create a library
142
    $driver->pause(50000);
143
    warn $driver->get_title();
141
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol/li[1]/input')->send_keys("Test");
144
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol/li[1]/input')->send_keys("Test");
142
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol/li[2]/input')->send_keys("Test library");
145
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol/li[2]/input')->send_keys("Test library");
143
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/input[3]')->click();
146
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/input[3]')->click();
Lines 147-164 SKIP: { Link Here
147
    $driver->find_element_by_xpath('/html/body/div[1]/div/div/form/fieldset/ol/li[1]/input')->send_keys("PAT");
150
    $driver->find_element_by_xpath('/html/body/div[1]/div/div/form/fieldset/ol/li[1]/input')->send_keys("PAT");
148
    $driver->find_element_by_xpath('/html/body/div[1]/div/div/form/fieldset/ol/li[2]/input')->send_keys("Test patron category");
151
    $driver->find_element_by_xpath('/html/body/div[1]/div/div/form/fieldset/ol/li[2]/input')->send_keys("Test patron category");
149
    $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');
152
    $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');
150
    $driver->find_element_by_xpath('/html/body/div[1]/div/div/form/fieldset/p')->click();
153
    $driver->find_element_by_xpath('/html/body/div[1]/div/div/form/fieldset/input[3]')->click;
151
    time_diff("Patron category created");
154
    time_diff("Patron category created");
152
155
153
    $driver->set_window_size(1000, 1000);
156
    $driver->set_window_size(1000, 1000);
154
    $driver->maximize_window();
157
    $driver->maximize_window();
155
    $driver->set_implicit_wait_timeout(20000);
156
#Onboarding tool Create Koha adminstrator patron
158
#Onboarding tool Create Koha adminstrator patron
157
    $driver->mouse_move_to_location(xoffset => 100, yoffset => 100);
159
    $driver->pause(50000);
160
    warn $driver->get_title();
158
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[1]/li[1]/input')->send_keys("Smith");
161
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[1]/li[1]/input')->send_keys("Smith");
159
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[1]/li[2]/input')->send_keys("Mary");
162
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[1]/li[2]/input')->send_keys("Mary");
160
    $driver->mouse_move_to_location(xoffset => 200, yoffset => 200);
163
161
    $driver->maximize_window();
164
    $driver->pause(50000);
165
    warn $driver->get_title();
162
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[2]/li[1]/input')->send_keys("10203");
166
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[2]/li[1]/input')->send_keys("10203");
163
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[4]/li[1]/input')->send_keys("Mary");
167
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[4]/li[1]/input')->send_keys("Mary");
164
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[4]/li[2]/input')->send_keys("password");
168
    $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/ol[4]/li[2]/input')->send_keys("password");
165
- 

Return to bug 18974