Bugzilla – Attachment 177302 Details for
Bug 34778
Add a 'Show password'/eye icon to toggle visibility of password when logging into OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34778: Add a selenium test
Bug-34778-Add-a-selenium-test.patch (text/plain), 3.06 KB, created by
David Cook
on 2025-01-28 23:05:55 UTC
(
hide
)
Description:
Bug 34778: Add a selenium test
Filename:
MIME Type:
Creator:
David Cook
Created:
2025-01-28 23:05:55 UTC
Size:
3.06 KB
patch
obsolete
>From e919d91f107a5d71aaa323a781b1ce670c9d65b0 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 16 Jan 2025 23:41:44 +0000 >Subject: [PATCH] Bug 34778: Add a selenium test >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >prove -v t/db_dependent/selenium/authentication.t > >Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com> >Signed-off-by: David Cook <dcook@prosentient.com.au> >--- > t/db_dependent/selenium/authentication.t | 35 +++++++++++++++++++++++- > 1 file changed, 34 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/selenium/authentication.t b/t/db_dependent/selenium/authentication.t >index b046ff9eb9..baee58de76 100755 >--- a/t/db_dependent/selenium/authentication.t >+++ b/t/db_dependent/selenium/authentication.t >@@ -142,7 +142,7 @@ SKIP: { > }; > > subtest 'OPAC interface authentication' => sub { >- plan tests => 7; >+ plan tests => 11; > > my $mainpage = $s->opac_base_url . q|opac-main.pl|; > >@@ -159,6 +159,23 @@ SKIP: { > # Using the modal > $driver->find_element('//a[@class="nav-link login-link loginModal-trigger"]')->click; > $s->fill_form( { muserid => $patron->userid, mpassword => $password } ); >+ >+ is( >+ $driver->find_element('//div[@id="loginModal"]//input[@id="mpassword"]')->get_attribute('type'), >+ 'password', >+ 'Password field is obscured initially' >+ ); >+ >+ $driver->find_element('//input[@id="show-password-toggle-checkbox-modal"]')->click; >+ >+ is( >+ $driver->find_element('//div[@id="loginModal"]//input[@id="mpassword"]')->get_attribute('type'), >+ 'text', >+ 'Password field is shown' >+ ); >+ >+ $driver->find_element('//input[@id="show-password-toggle-checkbox-modal"]')->click; >+ > $driver->find_element('//div[@id="loginModal"]//input[@type="submit"]')->click; > like( $driver->get_title, qr(Koha online catalog), 'Patron without permission should be able to login to the OPAC using the modal' ); > $driver->find_element('//div[@id="userdetails"]'); >@@ -190,6 +207,22 @@ SKIP: { > > # Using the form on the right > $s->fill_form( { userid => $patron->userid, password => $password } ); >+ >+ is( >+ $driver->find_element('//div[@id="login"]//input[@id="password"]')->get_attribute('type'), >+ 'password', >+ 'Password field is obscured initially' >+ ); >+ >+ $driver->find_element('//input[@id="show-password-toggle-checkbox-main"]')->click; >+ >+ is( >+ $driver->find_element('//div[@id="login"]//input[@id="password"]')->get_attribute('type'), >+ 'text', >+ 'Password field is shown' >+ ); >+ >+ $driver->find_element('//input[@id="show-password-toggle-checkbox-main"]')->click; > $s->submit_form; > $driver->find_element('//div[@id="userdetails"]'); > like( $driver->get_title, qr(Your library home), 'Patron without permissions should be able to login to the OPAC using the form on the right'); >-- >2.39.5
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 34778
:
173115
|
173310
|
174442
|
176485
|
176486
|
176501
|
176502
|
176505
|
176506
|
176703
|
176904
|
176905
|
176907
|
176908
|
176909
|
176910
|
176911
|
177272
|
177300
|
177301
| 177302 |
177303
|
177304
|
177305