Bug 40316: Remove warnings from selenium/regressions.t

Wide character in print at /usr/share/perl/5.36/Test2/Formatter/TAP.pm line 156.

Test plan:
Confirm that
  % prove t/db_dependent/selenium/regressions.t
still passes and does not generate warnings

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5f44a5ef5a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit fc9647c5ac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2025-07-07 13:32:11 +02:00 committed by Fridolin Somers
parent 5adb51cdd3
commit 4ce645a170
No known key found for this signature in database
GPG Key ID: 9A8E73E2A8B96537
1 changed files with 10 additions and 3 deletions

View File

@ -17,11 +17,13 @@
use Modern::Perl;
use utf8;
use Encode qw(encode_utf8);
use C4::Context;
use Test::More;
use Test::MockModule;
use Test::NoWarnings;
use C4::Context;
use C4::Biblio qw( AddBiblio );
@ -36,7 +38,7 @@ eval { require Selenium::Remote::Driver; };
if ( $@ ) {
plan skip_all => "Selenium::Remote::Driver is needed for selenium tests.";
} else {
plan tests => 9;
plan tests => 10;
}
my $s = t::lib::Selenium->new;
@ -345,7 +347,9 @@ subtest 'Encoding in session variables' => sub {
is(
$driver->find_element( '//span[@class="logged-in-branch-name"]')->get_text(),
$branchname,
sprintf( "logged-in-branch-name set - SessionStorage=%s, branchname=%s", $SessionStorage, $branchname
sprintf(
"logged-in-branch-name set - SessionStorage=%s, branchname=%s", $SessionStorage,
encode_utf8($branchname)
)
);
@ -364,7 +368,10 @@ subtest 'Encoding in session variables' => sub {
is(
$td_checked_out_from->get_text(),
$branchname,
sprintf( "'Checked out from' column should contain the branchname - SessionStorage=%s, branchname=%s", $SessionStorage, $branchname )
sprintf(
"'Checked out from' column should contain the branchname - SessionStorage=%s, branchname=%s",
$SessionStorage, encode_utf8($branchname)
)
);
# Remove the check in