Bugzilla – Attachment 129343 Details for
Bug 29690
Software error in details.pl when invalid MARCXML
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29690: Add selenium test
Bug-29690-Add-selenium-test.patch (text/plain), 2.32 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-01-12 13:11:21 UTC
(
hide
)
Description:
Bug 29690: Add selenium test
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-01-12 13:11:21 UTC
Size:
2.32 KB
patch
obsolete
>From 852386038c5912d18a57a962cbdcc2f3706575be Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 15 Dec 2021 08:24:16 +0100 >Subject: [PATCH] Bug 29690: Add selenium test > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/selenium/regressions.t | 34 +++++++++++++++++++++++++++ > 1 file changed, 34 insertions(+) > >diff --git a/t/db_dependent/selenium/regressions.t b/t/db_dependent/selenium/regressions.t >index aa7717f806..303f2d36bb 100755 >--- a/t/db_dependent/selenium/regressions.t >+++ b/t/db_dependent/selenium/regressions.t >@@ -91,6 +91,40 @@ subtest 'OPAC - Bibliographic record detail page must contain the data-biblionum > push @cleanup, $biblio; > }; > >+subtest 'Bibliographic record detail page must not explode even with invalid metadata' => sub { >+ plan tests => 2; >+ >+ my $builder = t::lib::TestBuilder->new; >+ my $patron = $builder->build_object({ class => 'Koha::Patrons', value => { flags => 0 }}); >+ >+ my $mainpage = $s->base_url . q|mainpage.pl|; >+ $driver->get($mainpage . q|?logout.x=1|); >+ like( $driver->get_title(), qr(Log in to Koha), ); >+ $s->auth; >+ >+ my ( $biblionumber, $biblioitemnumber ) = add_biblio(); >+ my $biblio = Koha::Biblios->find($biblionumber); >+ >+ # Note that there are several "non xml chars" in the control fields >+ my $invalid_data = qq{<?xml version="1.0" encoding="UTF-8"?> >+ <record >+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >+ xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" >+ xmlns="http://www.loc.gov/MARC21/slim"> >+ <leader>00772nam0a2200277 4500</leader> >+ <controlfield tag="001">00aD000015937</controlfield> >+ <controlfield tag="004">00satmrnu0</controlfield> >+ <controlfield tag="008">00ar19881981bdkldan</controlfield> >+ </record>}; >+ $biblio->metadata->metadata($invalid_data)->store(); >+ >+ $driver->get( $base_url . "/catalogue/detail.pl?biblionumber=$biblionumber" ); >+ >+ my $biberror = $driver->find_element('//span[@class="biberror"]')->get_text(); >+ is( $biberror, "There is an error with this bibliographic record, the view may be degraded."); >+ push @cleanup, $biblio; >+}; >+ > subtest 'Play sound on the circulation page' => sub { > plan tests => 1; > >-- >2.32.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 29690
:
128484
|
128485
|
128486
|
128487
|
128488
|
128497
|
128530
|
128531
|
128532
|
128533
|
128541
|
128578
|
129339
|
129340
|
129341
|
129342
|
129343
|
129344
|
129345
|
129365
|
129381
|
129382
|
129542
|
129543
|
129730
|
129731