View | Details | Raw Unified | Return to bug 23102
Collapse All | Expand All

(-)a/t/db_dependent/selenium/regressions.t (-2 / +32 lines)
Lines 36-42 eval { require Selenium::Remote::Driver; }; Link Here
36
if ( $@ ) {
36
if ( $@ ) {
37
    plan skip_all => "Selenium::Remote::Driver is needed for selenium tests.";
37
    plan skip_all => "Selenium::Remote::Driver is needed for selenium tests.";
38
} else {
38
} else {
39
    plan tests => 8;
39
    plan tests => 9;
40
}
40
}
41
41
42
my $s = t::lib::Selenium->new;
42
my $s = t::lib::Selenium->new;
Lines 54-59 my $AudioAlerts_value = C4::Context->preference('AudioAlerts'); Link Here
54
C4::Context->set_preference('AudioAlerts', '1');
54
C4::Context->set_preference('AudioAlerts', '1');
55
55
56
our @cleanup;
56
our @cleanup;
57
58
subtest 'SCI can load error pages' => sub {
59
    plan tests => 1;
60
61
    my $builder  = t::lib::TestBuilder->new;
62
    my $patron = $builder->build_object({ class => 'Koha::Patrons', value => { flags => 0 }});
63
    t::lib::Mocks::mock_preference( 'RequireStrongPassword', 0 );
64
    my $password = Koha::AuthUtils::generate_password($patron->category);
65
    $patron->set_password({ password => $password });
66
67
    my $dbh = C4::Context->dbh();
68
    my $sth = $dbh->prepare("INSERT INTO user_permissions (borrowernumber, module_bit, code) VALUES ( ?, 23,'self_checkin_module')");
69
    $sth->execute($patron->borrowernumber);
70
71
    my $sci_mo = C4::Context->preference('SelfCheckInModule');
72
    my $sci_js = C4::Context->preference('SelfCheckInUserJS');
73
    C4::Context->set_preference('SelfCheckInUserJS','</script><img src="'.$s->opac_base_url.'/silk/famfamfam.png"/><script>');
74
    C4::Context->set_preference('SelfCheckInModule','1');
75
76
    my $sci_module = $s->opac_base_url . qq|sci/sci-main.pl|;
77
    $driver->get($sci_module);
78
    $s->fill_form( { userid => $patron->userid, password => $password } );
79
    $s->submit_form();
80
    $driver->get($sci_module);
81
    like( $driver->get_title(), qr(Self check-in), );
82
83
    C4::Context->set_preference('SelfCheckInUserJS',$sci_js);
84
    C4::Context->set_preference('SelfCheckInModule',$sci_mo);
85
    push @cleanup, $patron, $patron->category, $patron->library;
86
};
87
57
subtest 'OPAC - borrowernumber, branchcode and categorycode as html attributes' => sub {
88
subtest 'OPAC - borrowernumber, branchcode and categorycode as html attributes' => sub {
58
    plan tests => 3;
89
    plan tests => 3;
59
90
60
- 

Return to bug 23102