View | Details | Raw Unified | Return to bug 29690
Collapse All | Expand All

(-)a/t/db_dependent/selenium/regressions.t (-1 / +34 lines)
Lines 91-96 subtest 'OPAC - Bibliographic record detail page must contain the data-biblionum Link Here
91
    push @cleanup, $biblio;
91
    push @cleanup, $biblio;
92
};
92
};
93
93
94
subtest 'Bibliographic record detail page must not explode even with invalid metadata' => sub {
95
    plan tests => 2;
96
97
    my $builder = t::lib::TestBuilder->new;
98
    my $patron = $builder->build_object({ class => 'Koha::Patrons', value => { flags => 0 }});
99
100
    my $mainpage = $s->base_url . q|mainpage.pl|;
101
    $driver->get($mainpage . q|?logout.x=1|);
102
    like( $driver->get_title(), qr(Log in to Koha), );
103
    $s->auth;
104
105
    my ( $biblionumber, $biblioitemnumber ) = add_biblio();
106
    my $biblio = Koha::Biblios->find($biblionumber);
107
108
    # Note that there are several "non xml chars" in the control fields
109
    my $invalid_data = qq{<?xml version="1.0" encoding="UTF-8"?>
110
    <record
111
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
112
        xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"
113
        xmlns="http://www.loc.gov/MARC21/slim">
114
    <leader>00772nam0a2200277   4500</leader>
115
    <controlfield tag="001">00aD000015937</controlfield>
116
    <controlfield tag="004">00satmrnu0</controlfield>
117
    <controlfield tag="008">00ar19881981bdkldan</controlfield>
118
    </record>};
119
    $biblio->metadata->metadata($invalid_data)->store();
120
121
    $driver->get( $base_url . "/catalogue/detail.pl?biblionumber=$biblionumber" );
122
123
    my $biberror = $driver->find_element('//span[@class="biberror"]')->get_text();
124
    is( $biberror, "There is an error with this bibliographic record, the view may be degraded.");
125
    push @cleanup, $biblio;
126
};
127
94
subtest 'Play sound on the circulation page' => sub {
128
subtest 'Play sound on the circulation page' => sub {
95
    plan tests => 1;
129
    plan tests => 1;
96
130
97
- 

Return to bug 29690