From 77b10e87b251f0cb3350a4a62cf55a4a716bc91c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 27 Jan 2021 11:35:35 +0100 Subject: [PATCH] Bug 27029: Add a selenium regression test Signed-off-by: Jonathan Druart (cherry picked from commit 03dea5f51e3859090f563f72475cffa1da9c7645) Signed-off-by: Fridolin Somers (cherry picked from commit 178026f3390ffae38445449477a39211cead3d04) Signed-off-by: Andrew Fuerste-Henry --- t/db_dependent/selenium/regressions.t | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/selenium/regressions.t b/t/db_dependent/selenium/regressions.t index ceb07978ff..c823774806 100644 --- a/t/db_dependent/selenium/regressions.t +++ b/t/db_dependent/selenium/regressions.t @@ -19,7 +19,7 @@ use Modern::Perl; use C4::Context; -use Test::More tests => 5; +use Test::More tests => 6; use Test::MockModule; use C4::Context; @@ -70,6 +70,23 @@ subtest 'OPAC - borrowernumber and branchcode as html attributes' => sub { push @cleanup, $patron, $patron->category, $patron->library; }; +subtest 'OPAC - Bibliographic record detail page must contain the data-biblionumber' => sub { + plan tests => 1; + + my $builder = t::lib::TestBuilder->new; + + my ( $biblionumber, $biblioitemnumber ) = add_biblio(); + my $biblio = Koha::Biblios->find($biblionumber); + + $driver->get( $opac_base_url . "opac-detail.pl?biblionumber=$biblionumber" ); + + my $elt = $driver->find_element('//div[@id="catalogue_detail_biblio"]'); + is( $elt->get_attribute( 'data-biblionumber', 1 ), + $biblionumber, "#catalogue_detail_biblio contains data-biblionumber" ); + + push @cleanup, $biblio; + }; + subtest 'OPAC - Remove from cart' => sub { plan tests => 4; -- 2.39.5