Bug 18804 - Selenium tests are failing
Summary: Selenium tests are failing
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on: 13691
Blocks: 18982
  Show dependency treegraph
 
Reported: 2017-06-14 16:11 UTC by Jonathan Druart
Modified: 2017-07-31 11:27 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18804: Skip selenium tests if Selenium::Remote::Driver is not installed (11.70 KB, patch)
2017-06-14 16:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18804: (bug 16286 follow-up) Update the "save category" elt selector (1.24 KB, patch)
2017-06-14 16:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18804: (bugs 16400,11088 follow-up) Update the "save category" elt selector (1.54 KB, patch)
2017-06-14 16:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18804: (bug 13501 follow-up) Fix add item form (select2) (1.09 KB, patch)
2017-06-14 16:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18804: Skip selenium tests if Selenium::Remote::Driver is not installed (11.76 KB, patch)
2017-06-15 21:32 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 18804: (bug 16286 follow-up) Update the "save category" elt selector (1.30 KB, patch)
2017-06-15 21:33 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 18804: (bugs 16400,11088 follow-up) Update the "save category" elt selector (1.60 KB, patch)
2017-06-15 21:33 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 18804: (bug 13501 follow-up) Fix add item form (select2) (1.15 KB, patch)
2017-06-15 21:33 UTC, Chris Cormack
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 18804: Skip selenium tests if Selenium::Remote::Driver is not installed (11.77 KB, patch)
2017-06-15 21:50 UTC, Lee Jamison
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 18804: Skip selenium tests if Selenium::Remote::Driver is not installed (11.77 KB, patch)
2017-06-15 21:51 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 18804: Skip selenium tests if Selenium::Remote::Driver is not installed (11.81 KB, patch)
2017-06-15 22:14 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 18804: (bug 16286 follow-up) Update the "save category" elt selector (1.34 KB, patch)
2017-06-15 22:15 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 18804: (bugs 16400,11088 follow-up) Update the "save category" elt selector (1.65 KB, patch)
2017-06-15 22:15 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 18804: (bug 13501 follow-up) Fix add item form (select2) (1.19 KB, patch)
2017-06-15 22:15 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 18804: Skip selenium tests if Selenium::Remote::Driver is not installed (11.90 KB, patch)
2017-06-16 07:29 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18804: (bug 16286 follow-up) Update the "save category" elt selector (1.44 KB, patch)
2017-06-16 07:29 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18804: (bugs 16400,11088 follow-up) Update the "save category" elt selector (1.74 KB, patch)
2017-06-16 07:30 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18804: (bug 13501 follow-up) Fix add item form (select2) (1.29 KB, patch)
2017-06-16 07:30 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18804: Add additional information to execute successfuly selenium tests (1.20 KB, patch)
2017-06-16 20:01 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2017-06-14 16:11:41 UTC
These tests are not run regularly and they are now completely broken.
Comment 1 Jonathan Druart 2017-06-14 16:36:33 UTC
Created attachment 64289 [details] [review]
Bug 18804: Skip selenium tests if Selenium::Remote::Driver is not installed

We do not want these tests to fail if the module is not installed.
This module is not in the dependencies of Koha and it is good as it.
A developper who wants to use it will know what to do.
It is part of RM duties to make sure these tests pass
Comment 2 Jonathan Druart 2017-06-14 16:36:40 UTC
Created attachment 64290 [details] [review]
Bug 18804: (bug 16286 follow-up) Update the "save category" elt selector

Bug 16286 replaced the submit node:
  <input type="button" value="Save" onclick="Check(this.form);" />
with
  <input type="submit" value="Save" />
Comment 3 Jonathan Druart 2017-06-14 16:36:44 UTC
Created attachment 64291 [details] [review]
Bug 18804: (bugs 16400,11088 follow-up) Update the "save category" elt selector

With bug 11088 and bug 16400 the submit node switched from:
  <input type="submit" name="save" onclick="return check_form_borrowers();" value="Save" />
to:
  <button type="submit" name="save" onclick="return check_form_borrowers">
then finally to:
  <button class="btn btn-small" id="saverecord" type="submit" name="save" onclick="return check_form_borrowers();">
Comment 4 Jonathan Druart 2017-06-14 16:36:49 UTC
Created attachment 64292 [details] [review]
Bug 18804: (bug 13501 follow-up) Fix add item form (select2)

Hard to say here, select2 adds so many elements that we need to ignore.
Here we just assume that input text with an id starting with
tag_952_subfield must be filled
Comment 5 Jonathan Druart 2017-06-14 16:58:41 UTC
Additional information:

To test this patch:
% wget https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar
% sudo apt-get install xvfb firefox-esr
% SELENIUM_PATH=/home/vagrant/selenium-server-standalone-2.53.1.jar
% Xvfb :1 -screen 0 1024x768x24 2>&1 >/dev/null &
% DISPLAY=:1 java -jar $SELENIUM_PATH

Remove the rentalcharge:
% UPDATE itemtypes SET rentalcharge = 0;

Then you can execute the test file.

If you get:
Wide character in print at /usr/local/share/perl/5.20.2/Test2/Formatter/TAP.pm line 105.
#                   'Koha › Patrons › Add patron test_patron_surname (Adult)'
#     doesn't match '(?^u:Patron details for test_patron_surname)'

Ignore and retry (FIXME LATER...)


No need to say that this code needs more love. The plan here is to make the tests pass, it will already be a big step.

Tested on 17.05.x, 16.11.x and 16.05.x
Comment 6 Jonathan Druart 2017-06-15 19:00:59 UTC
Block RM actions (cannot test before pushing stuffs).
Comment 7 Chris Cormack 2017-06-15 21:32:35 UTC
Created attachment 64358 [details] [review]
Bug 18804: Skip selenium tests if Selenium::Remote::Driver is not installed

We do not want these tests to fail if the module is not installed.
This module is not in the dependencies of Koha and it is good as it.
A developper who wants to use it will know what to do.
It is part of RM duties to make sure these tests pass

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 8 Chris Cormack 2017-06-15 21:33:12 UTC
Created attachment 64359 [details] [review]
Bug 18804: (bug 16286 follow-up) Update the "save category" elt selector

Bug 16286 replaced the submit node:
  <input type="button" value="Save" onclick="Check(this.form);" />
with
  <input type="submit" value="Save" />

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 9 Chris Cormack 2017-06-15 21:33:30 UTC
Created attachment 64360 [details] [review]
Bug 18804: (bugs 16400,11088 follow-up) Update the "save category" elt selector

With bug 11088 and bug 16400 the submit node switched from:
  <input type="submit" name="save" onclick="return check_form_borrowers();" value="Save" />
to:
  <button type="submit" name="save" onclick="return check_form_borrowers">
then finally to:
  <button class="btn btn-small" id="saverecord" type="submit" name="save" onclick="return check_form_borrowers();">

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 10 Chris Cormack 2017-06-15 21:33:51 UTC
Created attachment 64361 [details] [review]
Bug 18804: (bug 13501 follow-up) Fix add item form (select2)

Hard to say here, select2 adds so many elements that we need to ignore.
Here we just assume that input text with an id starting with
tag_952_subfield must be filled

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 11 Lee Jamison 2017-06-15 21:50:08 UTC
Created attachment 64362 [details] [review]
[SIGNED-OFF] Bug 18804: Skip selenium tests if Selenium::Remote::Driver is not installed

We do not want these tests to fail if the module is not installed.
This module is not in the dependencies of Koha and it is good as it.
A developper who wants to use it will know what to do.
It is part of RM duties to make sure these tests pass

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 12 Lee Jamison 2017-06-15 21:51:49 UTC
Created attachment 64363 [details] [review]
[SIGNED-OFF] Bug 18804: Skip selenium tests if Selenium::Remote::Driver is not installed

We do not want these tests to fail if the module is not installed.
This module is not in the dependencies of Koha and it is good as it.
A developper who wants to use it will know what to do.
It is part of RM duties to make sure these tests pass

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 13 Lee Jamison 2017-06-15 22:14:48 UTC
Created attachment 64365 [details] [review]
Bug 18804: Skip selenium tests if Selenium::Remote::Driver is not installed

We do not want these tests to fail if the module is not installed.
This module is not in the dependencies of Koha and it is good as it.
A developper who wants to use it will know what to do.
It is part of RM duties to make sure these tests pass

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 14 Lee Jamison 2017-06-15 22:15:06 UTC
Created attachment 64366 [details] [review]
Bug 18804: (bug 16286 follow-up) Update the "save category" elt selector

Bug 16286 replaced the submit node:
  <input type="button" value="Save" onclick="Check(this.form);" />
with
  <input type="submit" value="Save" />

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 15 Lee Jamison 2017-06-15 22:15:09 UTC
Created attachment 64367 [details] [review]
Bug 18804: (bugs 16400,11088 follow-up) Update the "save category" elt selector

With bug 11088 and bug 16400 the submit node switched from:
  <input type="submit" name="save" onclick="return check_form_borrowers();" value="Save" />
to:
  <button type="submit" name="save" onclick="return check_form_borrowers">
then finally to:
  <button class="btn btn-small" id="saverecord" type="submit" name="save" onclick="return check_form_borrowers();">

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 16 Lee Jamison 2017-06-15 22:15:12 UTC
Created attachment 64368 [details] [review]
Bug 18804: (bug 13501 follow-up) Fix add item form (select2)

Hard to say here, select2 adds so many elements that we need to ignore.
Here we just assume that input text with an id starting with
tag_952_subfield must be filled

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 17 Marcel de Rooy 2017-06-16 07:29:53 UTC
Created attachment 64373 [details] [review]
Bug 18804: Skip selenium tests if Selenium::Remote::Driver is not installed

We do not want these tests to fail if the module is not installed.
This module is not in the dependencies of Koha and it is good as it.
A developper who wants to use it will know what to do.
It is part of RM duties to make sure these tests pass

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 18 Marcel de Rooy 2017-06-16 07:29:57 UTC
Created attachment 64374 [details] [review]
Bug 18804: (bug 16286 follow-up) Update the "save category" elt selector

Bug 16286 replaced the submit node:
  <input type="button" value="Save" onclick="Check(this.form);" />
with
  <input type="submit" value="Save" />

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 19 Marcel de Rooy 2017-06-16 07:30:01 UTC
Created attachment 64375 [details] [review]
Bug 18804: (bugs 16400,11088 follow-up) Update the "save category" elt selector

With bug 11088 and bug 16400 the submit node switched from:
  <input type="submit" name="save" onclick="return check_form_borrowers();" value="Save" />
to:
  <button type="submit" name="save" onclick="return check_form_borrowers">
then finally to:
  <button class="btn btn-small" id="saverecord" type="submit" name="save" onclick="return check_form_borrowers();">

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 20 Marcel de Rooy 2017-06-16 07:30:05 UTC
Created attachment 64376 [details] [review]
Bug 18804: (bug 13501 follow-up) Fix add item form (select2)

Hard to say here, select2 adds so many elements that we need to ignore.
Here we just assume that input text with an id starting with
tag_952_subfield must be filled

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 21 Jonathan Druart 2017-06-16 20:01:37 UTC
Created attachment 64417 [details] [review]
Bug 18804: Add additional information to execute successfuly selenium tests
Comment 22 Jonathan Druart 2017-06-16 20:05:49 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 23 Fridolin SOMERS 2017-06-27 14:32:07 UTC
Pushed to 17.05.x, will be in 17.05.02
Comment 24 Katrin Fischer 2017-06-27 21:45:16 UTC
Tested successfully in 16.11.x. (thx for comment#5, Jonathan!)

These patches have been pushed to 16.11.x and will be in 16.11.10.
Comment 25 Mason James 2017-07-31 11:27:04 UTC
Pushed to 16.05.x, for 16.05.15 release