From a1bb37c6b641980c0eaf06008fff3274ec86ea0e Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 14 Feb 2020 15:15:10 +0000 Subject: [PATCH] Bug 23102: Selenium test --- t/db_dependent/selenium/regressions.t | 33 ++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/selenium/regressions.t b/t/db_dependent/selenium/regressions.t index 8b3e34646b..29155758c7 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,37 @@ 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->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','