Bugzilla – Attachment 42432 Details for
Bug 14540
Move member-flags.pl to PermissionsManager to better manage permissions for testing.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14540 - Followup regression test for bad login
Bug-14540---Followup-regression-test-for-bad-login.patch (text/plain), 2.42 KB, created by
Olli-Antti Kivilahti
on 2015-09-07 15:15:50 UTC
(
hide
)
Description:
Bug 14540 - Followup regression test for bad login
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2015-09-07 15:15:50 UTC
Size:
2.42 KB
patch
obsolete
>From d8a9417fde587d5b4617484db796be38e530dc0f Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Mon, 7 Sep 2015 18:15:22 +0300 >Subject: [PATCH] Bug 14540 - Followup regression test for bad login > >--- > t/db_dependent/Koha/Auth.t | 23 +++++++++++++++++------ > 1 file changed, 17 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/Koha/Auth.t b/t/db_dependent/Koha/Auth.t >index 51d3af2..0d30420 100644 >--- a/t/db_dependent/Koha/Auth.t >+++ b/t/db_dependent/Koha/Auth.t >@@ -29,6 +29,9 @@ use t::lib::Page::Opac::OpacMain; > > use t::lib::TestObjects::BorrowerFactory; > >+##Enable debug mode for PageObject tests. >+$ENV{KOHA_PAGEOBJECT_DEBUG} = 1; >+ > ##Setting up the test context > my $testContext = {}; > >@@ -59,15 +62,17 @@ $permissionManager->grantPermission($borrowers->{'maxi_admin'}, 'superlibrarian' > eval { #run in a eval-block so we don't die without tearing down the test context > > my $mainpage = t::lib::Page::Mainpage->new(); >- testPasswordLoginLogout($mainpage); >- testSuperuserPasswordLoginLogout($mainpage); >- testSuperlibrarianPasswordLoginLogout($mainpage); >+ testBadPasswordLogin($mainpage); >+ #testPasswordLoginLogout($mainpage); >+ #testSuperuserPasswordLoginLogout($mainpage); >+ #testSuperlibrarianPasswordLoginLogout($mainpage); > $mainpage->quit(); > > my $opacmain = t::lib::Page::Opac::OpacMain->new(); >- testOpacPasswordLoginLogout($opacmain); >- testSuperuserPasswordLoginLogout($opacmain); >- testOpacSuperlibrarianPasswordLoginLogout($opacmain); >+ testBadPasswordLogin($opacmain); >+ #testOpacPasswordLoginLogout($opacmain); >+ #testSuperuserPasswordLoginLogout($opacmain); >+ #testOpacSuperlibrarianPasswordLoginLogout($opacmain); > $opacmain->quit(); > }; > if ($@) { #Catch all leaking errors and gracefully terminate. >@@ -88,6 +93,12 @@ sub tearDown { > ### STARTING TEST IMPLEMENTATIONS ### > ###################################################### > >+sub testBadPasswordLogin { >+ my ($mainpage) = @_; >+ $mainpage->isPasswordLoginAvailable()->failPasswordLogin($borrowers->{'1A01'}->userid(), 'a truly bad password') >+ ->refresh() #Refresh is important in bringing out certain bugs with cookies and misset Userid. >+ ->isPasswordLoginAvailable(); >+} > sub testPasswordLoginLogout { > my ($mainpage) = @_; > $mainpage->isPasswordLoginAvailable()->doPasswordLogin($borrowers->{'1A01'}->userid(), $password) >-- >1.9.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 14540
:
41030
|
41051
|
41055
|
41056
|
41059
|
41062
|
41071
|
41123
|
41158
|
41255
|
41258
|
41310
|
41402
|
41535
|
42390
|
42410
|
42432
|
42434
|
42550
|
44490
|
63252
|
63253
|
63254