Bugzilla – Attachment 68830 Details for
Bug 19185
Web installer and onboarding tool selenium test
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19185: Change to use ENV, fix login and passwords
Bug-19185-Change-to-use-ENV-fix-login-and-password.patch (text/plain), 2.39 KB, created by
Mark Tompsett
on 2017-10-30 04:27:02 UTC
(
hide
)
Description:
Bug 19185: Change to use ENV, fix login and passwords
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-10-30 04:27:02 UTC
Size:
2.39 KB
patch
obsolete
>From 7603f89ff6e9f15cae16c8785b695709d9ad0e4a Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Mon, 30 Oct 2017 04:23:30 +0000 >Subject: [PATCH] Bug 19185: Change to use ENV, fix login and passwords > >The kohadevbox has admin/admin set, so for testing when >creating the initial superuser, if you wish to minimize >effort, use admin/admin. Otherwise, make sure to: >export KOHA_USER={whatever your user is} >export KOHA_PASS={whatever your password is} >before attempting to run the test. > >Also, this test was failing because 'sub auth' was using >the ugliest of xpath's to find the submit button. >I've noticed the other selenium tests have similar functions. >It might be an idea to build a t/lib/Selenium.pm so as to >reduce code duplication and older versions differing from >newer versions. >--- > t/db_dependent/selenium/installkoha.t | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/selenium/installkoha.t b/t/db_dependent/selenium/installkoha.t >index 46eb885..f1209c1 100644 >--- a/t/db_dependent/selenium/installkoha.t >+++ b/t/db_dependent/selenium/installkoha.t >@@ -34,8 +34,12 @@ use MARC::Record; > use MARC::Field; > > my $dbh = C4::Context->dbh; >-my $login = 'koha_kohadev'; >-my $password = 'password'; >+my $login = $ENV{KOHA_USER} || 'koha_kohadev'; >+my $password = $ENV{KOHA_PASS} || 'password'; >+my $staff_client_base_url = >+ $ENV{KOHA_INTRANET_URL} || C4::Context->preference("staffClientBaseUrl") || q{}; >+my $base_url= $staff_client_base_url . "/cgi-bin/koha/"; >+my $opac_url = $ENV{KOHA_OPAC_URL} || C4::Context->preference("OPACBaseURL") || q{}; > > our $sample_data = { > category => { >@@ -48,8 +52,8 @@ our $sample_data = { > surname => 'test_patron_surname', > cardnumber => '4242424242', > userid => 'test_username', >- password => 'password', >- password2 => 'password' >+ password => 'Password123', >+ password2 => 'Password123' > }, > }; > >@@ -182,8 +186,8 @@ END { > > sub auth { > my ( $driver, $login, $password) = @_; >- fill_form( $driver, { userid => 'koha_kohadev', password => 'password' } ); >- my $login_button = $driver->find_element_by_xpath('/html/body/div/div/div/form/fieldset/input'); >+ fill_form( $driver, { userid => $login, password => $password } ); >+ my $login_button = $driver->find_element('//input[@id="submit"]'); > $login_button->submit(); > } > >-- >2.1.4
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 19185
:
66508
|
68830
|
75088
|
75089
|
75090
|
81913
|
81914
|
81915
|
103406
|
103407
|
103408
|
103416
|
105796
|
105797
|
105798
|
105799
|
120273
|
126646
|
126647
|
126648
|
126649
|
126650
|
126651
|
126652
|
126819
|
126901
|
126918
|
126984