From ee1b600d3625820e2bc9e5f39c864e66b12b5e12 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 4 Nov 2020 14:45:27 +0000 Subject: [PATCH] Bug 26847: Add unit test for categorycode in masthead This unit test adds a regression test for the addition of categorycode into the masthead of the staff client. Signed-off-by: Lucas Gass --- t/db_dependent/selenium/regressions.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/selenium/regressions.t b/t/db_dependent/selenium/regressions.t index 3ee8fa190c..a4296901a3 100755 --- a/t/db_dependent/selenium/regressions.t +++ b/t/db_dependent/selenium/regressions.t @@ -49,8 +49,8 @@ my $AudioAlerts_value = C4::Context->preference('AudioAlerts'); C4::Context->set_preference('AudioAlerts', '1'); our @cleanup; -subtest 'OPAC - borrowernumber and branchcode as html attributes' => sub { - plan tests => 2; +subtest 'OPAC - borrowernumber, branchcode and categorycode as html attributes' => sub { + plan tests => 3; my $patron = $builder->build_object( { class => 'Koha::Patrons', value => { flags => 1 } } ); @@ -65,6 +65,9 @@ subtest 'OPAC - borrowernumber and branchcode as html attributes' => sub { is( $elt->get_attribute('data-borrowernumber'), $patron->borrowernumber, "Since bug 20921 span.loggedinusername should contain data-borrowernumber" ); + is( $elt->get_attribute('data-categorycode'), $patron->categorycode, +"Since bug 26847 span.loggedinusername should contain data-categorycode" + ); push @cleanup, $patron, $patron->category, $patron->library; }; -- 2.11.0