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.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2021-10-29 10:33:57 +02:00
parent 42d1bc3d49
commit d4f32c745f

View file

@ -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;
};