Bug 18982

Summary: selenium tests needs too many prerequisites
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, katrin.fischer, mtj, sandboxes
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 18804    
Bug Blocks:    
Attachments: Bug 18982: Use KOHA_INTRANET_URL instead of syspref staffClientBaseURL
Bug 18982: category.categorycode must be uppercase
Bug 18982: Create a specific itemtype for these tests
Bug 18982: Create a circ rule for the data we created
Bug 18982: Use KOHA_INTRANET_URL instead of syspref staffClientBaseURL
Bug 18982: category.categorycode must be uppercase
Bug 18982: Create a specific itemtype for these tests
Bug 18982: Create a circ rule for the data we created
Bug 18982: Remove data in the correct order

Description Jonathan Druart 2017-07-25 19:56:41 UTC
The script must create the default data to avoid the tests to fail.
For instance itemtypes.rentalcharge must be 0, a default circ rule must exist.
Let's create these data.
Comment 1 Jonathan Druart 2017-07-25 20:02:44 UTC
Created attachment 65261 [details] [review]
Bug 18982: Use KOHA_INTRANET_URL instead of syspref staffClientBaseURL

That way we do not need to set the syspref, we can define it setting an
env var, like other tests.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 2 Jonathan Druart 2017-07-25 20:02:48 UTC
Created attachment 65262 [details] [review]
Bug 18982: category.categorycode must be uppercase

Otherwise it is not selected in the dropdown list and the patron created
does not belong to this category

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Jonathan Druart 2017-07-25 20:02:52 UTC
Created attachment 65263 [details] [review]
Bug 18982: Create a specific itemtype for these tests

No need to require rentalcharge=0 for all itemtypes, we create our own.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Jonathan Druart 2017-07-25 20:02:56 UTC
Created attachment 65264 [details] [review]
Bug 18982: Create a circ rule for the data we created

No need to have a default circ cule, we create one for the categorycode
and itemtype we are going to use.
The 3 checkouts will not be rejected (5 are allowed)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2017-07-25 20:03:31 UTC
Skipping SO & QA, they are needed to make Jenkins happy.
Comment 6 Jonathan Druart 2017-07-25 20:04:14 UTC
Pushed to master for 17.11.
Comment 7 Biblibre Sandboxes 2017-07-26 07:40:53 UTC
Created attachment 65268 [details] [review]
Bug 18982: Use KOHA_INTRANET_URL instead of syspref staffClientBaseURL

That way we do not need to set the syspref, we can define it setting an
env var, like other tests.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Andrei <acovaliov@gmail.com>
Comment 8 Biblibre Sandboxes 2017-07-26 07:40:55 UTC
Created attachment 65269 [details] [review]
Bug 18982: category.categorycode must be uppercase

Otherwise it is not selected in the dropdown list and the patron created
does not belong to this category

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Andrei <acovaliov@gmail.com>
Comment 9 Biblibre Sandboxes 2017-07-26 07:40:58 UTC
Created attachment 65270 [details] [review]
Bug 18982: Create a specific itemtype for these tests

No need to require rentalcharge=0 for all itemtypes, we create our own.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Andrei <acovaliov@gmail.com>
Comment 10 Biblibre Sandboxes 2017-07-26 07:41:00 UTC
Created attachment 65271 [details] [review]
Bug 18982: Create a circ rule for the data we created

No need to have a default circ cule, we create one for the categorycode
and itemtype we are going to use.
The 3 checkouts will not be rejected (5 are allowed)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Andrei <acovaliov@gmail.com>
Comment 11 Jonathan Druart 2017-07-26 16:51:34 UTC
Created attachment 65282 [details] [review]
Bug 18982: Remove data in the correct order

To respect FK

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2017-07-26 16:53:43 UTC
The last patch has been pushed to master for 17.11
Comment 13 Fridolin Somers 2017-07-27 13:56:15 UTC
Pushed to 17.05.x, will be in 17.05.03.
Comment 14 Katrin Fischer 2017-08-01 05:25:28 UTC
Hm, I installed the module, but still seeing:
ok 1 # skip Selenium::Remote::Driver is needed for selenium tests

These patches have been pushed to 16.11.x and will be in 16.11.10.
Comment 15 Katrin Fischer 2017-08-01 05:32:07 UTC
Sorry, 16.11.11!
Comment 16 Jonathan Druart 2017-08-01 11:20:18 UTC
(In reply to Katrin Fischer from comment #14)
> Hm, I installed the module, but still seeing:
> ok 1 # skip Selenium::Remote::Driver is needed for selenium tests

What returns `pmversion Selenium::Remote::Driver`?
You could also try to remove the eval in the SKIP block to know what is the error.
Comment 17 Mason James 2017-08-24 13:54:32 UTC
Pushed to 16.05.x, for 16.05.16 release