From 2bf080cfd302205fe3a3b32d5c1a615e57a89c39 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 29 Oct 2021 10:33:57 +0200 Subject: [PATCH] Bug 29364: Revert changes to framework visibility made by Search.t To recreate run: drop database koha_kohadev; create database koha_kohadev; restart_all KOHA_TESTING=1 prove t/db_dependent/selenium/01-installation.t t/db_dependent/Search.t t/db_dependent/Koha/UI/Form/Builder/Item.t # Failed test 'Item types should be sorted by description and an empty entries should be shown' # at t/db_dependent/Koha/UI/Form/Builder/Item.t line 127. # Structures begin differing at: # $got = undef # $expected = ARRAY(0x557716b68e98) # Itemtypes details: $VAR1 = undef; # $VAR2 = [ # 'BK', # 'CF', # 'CR', # 'ihxGmo7', # 'MP', # 'MU', # 'MX', # 'REF', # 'VM' # ]; # Failed test 'Labels should be correctly displayed' # at t/db_dependent/Koha/UI/Form/Builder/Item.t line 130. # Structures begin differing at: # $got = undef # $expected = HASH(0x557716e2e150) # Looks like you failed 2 tests of 2. # Failed test 'itemtypes' # at t/db_dependent/Koha/UI/Form/Builder/Item.t line 133. --- t/db_dependent/Search.t | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t index 29f89270497..8ccb0d81804 100755 --- a/t/db_dependent/Search.t +++ b/t/db_dependent/Search.t @@ -520,6 +520,7 @@ ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],' my $fw = C4::Biblio::GetFrameworkCode($biblio_id); my $dbh = C4::Context->dbh; + # FIXME This change is revert in END # Hide subfield 'p' in OPAC $dbh->do(qq{ UPDATE marc_subfield_structure @@ -978,3 +979,15 @@ subtest 'FindDuplicate' => sub { # Make sure that following tests are not using our config settings Koha::Caches->get_instance('config')->flush_all; +END { + my $dbh = C4::Context->dbh; + # Restore visibility of subfields in OPAC + $dbh->do(q{ + UPDATE marc_subfield_structure + SET hidden=0 + WHERE tagfield=952 AND + ( tagsubfield IN ('p', 'y') ) + }); + + Koha::Caches->get_instance->flush_all; +}; -- 2.25.1