Bug 27029: Add a selenium regression test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2021-01-27 11:35:35 +01:00
parent 0e60ab4f03
commit 03dea5f51e

View file

@ -19,7 +19,7 @@ use Modern::Perl;
use C4::Context; use C4::Context;
use Test::More tests => 5; use Test::More tests => 6;
use Test::MockModule; use Test::MockModule;
use C4::Context; use C4::Context;
@ -73,6 +73,23 @@ subtest 'OPAC - borrowernumber, branchcode and categorycode as html attributes'
push @cleanup, $patron, $patron->category, $patron->library; 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 { subtest 'OPAC - Remove from cart' => sub {
plan tests => 4; plan tests => 4;