Bugzilla – Attachment 137937 Details for
Bug 25449
Make itemtype mandatory by default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25449: Fix basic_workflow.t
Bug-25449-Fix-basicworkflowt.patch (text/plain), 3.15 KB, created by
Jonathan Druart
on 2022-07-20 15:41:06 UTC
(
hide
)
Description:
Bug 25449: Fix basic_workflow.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-07-20 15:41:06 UTC
Size:
3.15 KB
patch
obsolete
>From 4d52faeb8ae71f9ad166efd8060cea9bc0b77f07 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 20 Jul 2022 17:39:22 +0200 >Subject: [PATCH] Bug 25449: Fix basic_workflow.t > >We need to create an itemtype for the biblio, then the item form will >have 942$c prefilled by default > >STRACE: /usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...} > /usr/share/perl5/Selenium/Remote/Driver.pm:361 in Try::Tiny::try > (eval 1726):1 in Selenium::Remote::Driver::__ANON__ > (eval 1728):2 in Selenium::Remote::Driver::__ANON__ > /usr/share/perl5/Selenium/Remote/Driver.pm:953 in Selenium::Remote::Driver::_execute_command > t/db_dependent/selenium/basic_workflow.t:224 in Selenium::Remote::Driver::get_title > >Error while executing command: unexpected alert open: Dismissed user prompt dialog: Form not submitted because of the following problem(s) >------------------------------------------------------------------------------------ > >- 1 mandatory fields empty (highlighted) at /usr/share/perl5/Selenium/Remote/Driver.pm line 411. >--- > t/db_dependent/selenium/basic_workflow.t | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/selenium/basic_workflow.t b/t/db_dependent/selenium/basic_workflow.t >index de44740828c..09953927d9f 100755 >--- a/t/db_dependent/selenium/basic_workflow.t >+++ b/t/db_dependent/selenium/basic_workflow.t >@@ -130,6 +130,8 @@ SKIP: { > > $borrowernumber = $dbh->selectcol_arrayref(q|SELECT borrowernumber FROM borrowers WHERE userid=?|, {}, $sample_data->{patron}{userid} )->[0]; > >+ my $itemtype = $sample_data->{itemtype}; >+ > my @biblionumbers; > for my $i ( 1 .. $number_of_biblios_to_insert ) { > my $biblio = MARC::Record->new(); >@@ -138,11 +140,13 @@ SKIP: { > $biblio->append_fields( > MARC::Field->new('200', ' ', ' ', a => 'test biblio '.$i), > MARC::Field->new('200', ' ', ' ', f => 'test author '.$i), >+ MARC::Field->new('200', ' ', ' ', b => $itemtype->{itemtype}), > ); > } else { > $biblio->append_fields( > MARC::Field->new('245', ' ', ' ', a => 'test biblio '.$i), > MARC::Field->new('100', ' ', ' ', a => 'test author '.$i), >+ MARC::Field->new('942', ' ', ' ', c => $itemtype->{itemtype}), > ); > } > my ($biblionumber, $biblioitemnumber) = AddBiblio($biblio, ''); >@@ -151,8 +155,6 @@ SKIP: { > > time_diff("add biblio"); > >- my $itemtype = $sample_data->{itemtype}; >- > my $issuing_rules = $sample_data->{issuingrule}; > Koha::CirculationRules->set_rules( > { >@@ -204,6 +206,11 @@ SKIP: { > $v = strftime("%Y-%m-%d", localtime); > $effective_input = $driver->find_element('//div[@id="subfield952w"]/input[@class="input_marceditor flatpickr-input"]'); > } >+ elsif ( >+ $id =~ m|^tag_952_subfield_y| # itemtype >+ ) { >+ next; # auto-filled >+ } > elsif ( > $id =~ m|^tag_952_subfield_d| # dateaccessioned > ) { >-- >2.25.1
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 25449
:
105351
|
135571
|
135703
|
135972
|
135973
| 137937 |
137953