Bugzilla – Attachment 154691 Details for
Bug 23102
404 errors on page causes SCI user to be logged out
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23102: Selenium test
Bug-23102-Selenium-test.patch (text/plain), 2.76 KB, created by
Nick Clemens (kidclamp)
on 2023-08-22 13:24:40 UTC
(
hide
)
Description:
Bug 23102: Selenium test
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-08-22 13:24:40 UTC
Size:
2.76 KB
patch
obsolete
>From c1a30ce57e1d401cca097b74f4c8deb0d8ad2ea0 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 14 Feb 2020 15:15:10 +0000 >Subject: [PATCH] Bug 23102: Selenium test > >--- > t/db_dependent/selenium/regressions.t | 39 ++++++++++++++++++++++++++- > 1 file changed, 38 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/selenium/regressions.t b/t/db_dependent/selenium/regressions.t >index 66d169c1eb..6a8cfb3cd0 100755 >--- a/t/db_dependent/selenium/regressions.t >+++ b/t/db_dependent/selenium/regressions.t >@@ -36,7 +36,7 @@ eval { require Selenium::Remote::Driver; }; > if ( $@ ) { > plan skip_all => "Selenium::Remote::Driver is needed for selenium tests."; > } else { >- plan tests => 8; >+ plan tests => 9; > } > > my $s = t::lib::Selenium->new; >@@ -54,6 +54,43 @@ my $AudioAlerts_value = C4::Context->preference('AudioAlerts'); > C4::Context->set_preference('AudioAlerts', '1'); > > our @cleanup; >+ >+subtest 'SCI can load error pages' => sub { >+ plan tests => 1; >+ >+ my $builder = t::lib::TestBuilder->new; >+ my $patron = $builder->build_object( { class => 'Koha::Patrons', value => { flags => 0 } } ); >+ t::lib::Mocks::mock_preference( 'RequireStrongPassword', 0 ); >+ my $password = Koha::AuthUtils::generate_password( $patron->category ); >+ $patron->set_password( { password => $password } ); >+ >+ my $dbh = C4::Context->dbh(); >+ my $sth = $dbh->prepare( >+ "INSERT INTO user_permissions (borrowernumber, module_bit, code) VALUES ( ?, 23,'self_checkin_module')"); >+ $sth->execute( $patron->borrowernumber ); >+ >+ my $sci_mo = C4::Context->preference('SelfCheckInModule'); >+ my $sci_js = C4::Context->preference('SelfCheckInUserJS'); >+ C4::Context->set_preference( >+ 'SelfCheckInUserJS', >+ '</script><img src="' . $s->opac_base_url . '/silk/famfamfam.png"/><script>' >+ ); >+ C4::Context->set_preference( 'SelfCheckInModule', '1' ); >+ >+ my $sci_module = $s->opac_base_url . qq|sci/sci-main.pl|; >+ $driver->get($sci_module); >+ $s->fill_form( { userid => $patron->userid, password => $password } ); >+ $s->driver->find_element('//form[@id="auth"]//input[@type="submit"]')->click; >+ $s->fill_form( { barcode_input => "DONTMATTER" } ); >+ $s->driver->find_element('//form[@id="scan_form"]//button[@id="sci_append_button"]')->click; >+ $s->driver->find_element('//form[@id="scan_form"]//button[@id="sci_checkin_button"]')->click; >+ like( $driver->get_title(), qr(Self check-in), ); >+ >+ C4::Context->set_preference( 'SelfCheckInUserJS', $sci_js ); >+ C4::Context->set_preference( 'SelfCheckInModule', $sci_mo ); >+ push @cleanup, $patron, $patron->category, $patron->library; >+}; >+ > subtest 'OPAC - borrowernumber, branchcode and categorycode as html attributes' => sub { > plan tests => 3; > >-- >2.30.2
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 23102
:
90528
|
97581
|
98977
|
98978
|
148423
|
148424
|
148425
|
148426
|
148601
|
148767
|
148768
|
154691
|
154692
|
163358
|
163359
|
164591
|
164592
|
164593
|
164819