Bugzilla – Attachment 183832 Details for
Bug 40316
selenium/regressions.t generates warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40316: Remove warnings from selenium/regressions.t
Bug-40316-Remove-warnings-from-seleniumregressions.patch (text/plain), 2.22 KB, created by
Jonathan Druart
on 2025-07-07 11:33:06 UTC
(
hide
)
Description:
Bug 40316: Remove warnings from selenium/regressions.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-07-07 11:33:06 UTC
Size:
2.22 KB
patch
obsolete
>From 02af0fb944d4800e99374256d088e7a2185cd5d6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 7 Jul 2025 13:32:11 +0200 >Subject: [PATCH] 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 >--- > t/db_dependent/selenium/regressions.t | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/selenium/regressions.t b/t/db_dependent/selenium/regressions.t >index a55d9b2876b..790cda23831 100755 >--- a/t/db_dependent/selenium/regressions.t >+++ b/t/db_dependent/selenium/regressions.t >@@ -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; >@@ -354,7 +356,10 @@ 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) >+ ) > ); > > $driver->find_element('//input[@id="barcode"]')->send_keys( $item->barcode ); >@@ -372,7 +377,7 @@ subtest 'Encoding in session variables' => sub { > $branchname, > sprintf( > "'Checked out from' column should contain the branchname - SessionStorage=%s, branchname=%s", >- $SessionStorage, $branchname >+ $SessionStorage, encode_utf8($branchname) > ) > ); > >-- >2.34.1
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 40316
:
183832
|
183852