Bugzilla – Attachment 152196 Details for
Bug 33904
2FA registration fails if library name has non-latin characters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33904: Add tests
Bug-33904-Add-tests.patch (text/plain), 2.09 KB, created by
Martin Renvoize (ashimema)
on 2023-06-08 13:54:39 UTC
(
hide
)
Description:
Bug 33904: Add tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-06-08 13:54:39 UTC
Size:
2.09 KB
patch
obsolete
>From 3fa84fe8ab1228e255c80d9d93ffd4cf94cb9fb1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 6 Jun 2023 10:40:03 +0200 >Subject: [PATCH] Bug 33904: Add tests > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/selenium/authentication_2fa.t | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/selenium/authentication_2fa.t b/t/db_dependent/selenium/authentication_2fa.t >index 053b47343d..ac9fe9be11 100755 >--- a/t/db_dependent/selenium/authentication_2fa.t >+++ b/t/db_dependent/selenium/authentication_2fa.t >@@ -16,6 +16,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >+use utf8; > use Test::More tests => 5; > > use C4::Context; >@@ -34,7 +35,9 @@ SKIP: { > > my $builder = t::lib::TestBuilder->new; > >- my $patron = $builder->build_object({ class => 'Koha::Patrons', value => { flags => 1 }}); >+ my $library_name = 'my ⤠library'; >+ my $library = $builder->build_object( { class => 'Koha::Libraries', value => { branchname => $library_name } } ); >+ my $patron = $builder->build_object( { class => 'Koha::Patrons', value => { flags => 1, branchcode => $library->branchcode } } ); > $patron->flags(1)->store; # superlibrarian permission > my $password = Koha::AuthUtils::generate_password($patron->category); > t::lib::Mocks::mock_preference( 'RequireStrongPassword', 0 ); >@@ -46,7 +49,7 @@ SKIP: { > my $driver = $s->driver; > > subtest 'Setup' => sub { >- plan tests => 12; >+ plan tests => 13; > > my $mainpage = $s->base_url . q|mainpage.pl|; > $driver->get($mainpage); >@@ -79,6 +82,7 @@ SKIP: { > $driver->find_element('//*[@id="enable-2FA"]')->click; > $s->wait_for_ajax; > ok($driver->find_element('//img[@id="qr_code"]'), 'There is a QR code'); >+ is($driver->find_element('//span[@id="issuer"]')->get_text, $library_name); > > $driver->find_element('//*[@id="pin_code"]')->send_keys('wrong_code'); > $driver->find_element('//*[@id="register-2FA"]')->click; >-- >2.41.0
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 33904
:
152038
|
152039
|
152196
|
152197
|
152198
|
152218
|
152219
|
152220