Bugzilla – Attachment 65264 Details for
Bug 18982
selenium tests needs too many prerequisites
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18982: Create a circ rule for the data we created
Bug-18982-Create-a-circ-rule-for-the-data-we-creat.patch (text/plain), 2.91 KB, created by
Jonathan Druart
on 2017-07-25 20:02:56 UTC
(
hide
)
Description:
Bug 18982: Create a circ rule for the data we created
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-07-25 20:02:56 UTC
Size:
2.91 KB
patch
obsolete
>From 5b84987f28b43f0c92eeff9ed1067ed61f822a4b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 25 Jul 2017 16:49:38 -0300 >Subject: [PATCH] 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> >--- > t/db_dependent/selenium/basic_workflow.t | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/selenium/basic_workflow.t b/t/db_dependent/selenium/basic_workflow.t >index e185b4df93..48a232ca65 100644 >--- a/t/db_dependent/selenium/basic_workflow.t >+++ b/t/db_dependent/selenium/basic_workflow.t >@@ -62,7 +62,6 @@ our $sample_data = { > userid => 'test_username', > password => 'password', > password2 => 'password' >- > }, > itemtype => { > itemtype => 'IT4TEST', >@@ -70,6 +69,15 @@ our $sample_data = { > rentalcharge => 0, > notforloan => 0, > }, >+ issuingrule => { >+ categorycode => 'test_cat', >+ itemtype => 'IT4test', >+ branchcode => '*', >+ maxissueqty => '5', >+ issuelength => '5', >+ lengthunit => 'days', >+ renewalperiod => '5', >+ }, > }; > our ( $borrowernumber, $start, $prev_time, $cleanup_needed ); > >@@ -136,6 +144,9 @@ SKIP: { > my $itemtype = $sample_data->{itemtype}; > $dbh->do(q|INSERT INTO itemtypes (itemtype, description, rentalcharge, notforloan) VALUES (?, ?, ?, ?)|, undef, $itemtype->{itemtype}, $itemtype->{description}, $itemtype->{rentalcharge}, $itemtype->{notforloan}); > >+ my $issuing_rules = $sample_data->{issuingrule}; >+ $dbh->do(q|INSERT INTO issuingrules (categorycode, itemtype, branchcode, maxissueqty, issuelength, lengthunit, renewalperiod) VALUES (?, ?, ?, ?, ?, ?, ?)|, undef, $issuing_rules->{categorycode}, $issuing_rules->{itemtype}, $issuing_rules->{branchcode}, $issuing_rules->{maxissueqty}, $issuing_rules->{issuelength}, $issuing_rules->{lengthunit}, $issuing_rules->{renewalperiod}); >+ > for my $biblionumber ( @biblionumbers ) { > $driver->get($base_url."/cataloguing/additem.pl?biblionumber=$biblionumber"); > like( $driver->get_title(), qr(test biblio \d+ by test author), ); >@@ -223,6 +234,7 @@ sub cleanup { > $dbh->do(qq|DELETE items, biblio FROM biblio INNER JOIN items ON biblio.biblionumber = items.biblionumber WHERE biblio.title = "test biblio$i"|); > }; > $dbh->do(q|DELETE FROM itemtypes WHERE itemtype=?|, undef, $sample_data->{itemtype}{itemtype}); >+ $dbh->do(q|DELETE FROM issuingrules WHERE categorycode=? AND itemtype=? AND branchcode=?|, undef, $sample_data->{issuingrule}{categorycode}, $sample_data->{issuingrule}{itemtype}, $sample_data->{issuingrule}{branchcode}); > } > > sub time_diff { >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18982
:
65261
|
65262
|
65263
|
65264
|
65268
|
65269
|
65270
|
65271
|
65282