Bug 23816: Fix selenium tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2020-09-10 10:07:05 +02:00
parent 59b79b6045
commit 74dd083f8e
2 changed files with 4 additions and 4 deletions

View file

@ -47,8 +47,8 @@ SKIP: {
$driver->get($mainpage);
like( $driver->get_title, qr(Log in to Koha), 'Hitting the main page should redirect to the login form');
my $password = Koha::AuthUtils::generate_password();
my $patron = $builder->build_object({ class => 'Koha::Patrons', value => { flags => 0 }});
my $password = Koha::AuthUtils::generate_password($patron->category);
t::lib::Mocks::mock_preference( 'RequireStrongPassword', 0 );
$patron->set_password({ password => $password });
@ -81,8 +81,8 @@ SKIP: {
$driver->get($mainpage);
like( $driver->get_title, qr(Koha online catalog), 'Hitting the main page should not redirect to the login form');
my $password = Koha::AuthUtils::generate_password();
my $patron = $builder->build_object({ class => 'Koha::Patrons', value => { flags => 0 }});
my $password = Koha::AuthUtils::generate_password($patron->category);
t::lib::Mocks::mock_preference( 'RequireStrongPassword', 0 );
$patron->set_password({ password => $password });

View file

@ -54,7 +54,7 @@ subtest 'OPAC - borrowernumber and branchcode as html attributes' => sub {
my $patron = $builder->build_object(
{ class => 'Koha::Patrons', value => { flags => 1 } } );
my $password = Koha::AuthUtils::generate_password();
my $password = Koha::AuthUtils::generate_password($patron->category);
t::lib::Mocks::mock_preference( 'RequireStrongPassword', 0 );
$patron->set_password({ password => $password });
$s->opac_auth( $patron->userid, $password );
@ -205,7 +205,7 @@ subtest 'XSS vulnerabilities in pagination' => sub {
);
}
my $password = Koha::AuthUtils::generate_password();
my $password = Koha::AuthUtils::generate_password($patron->category);
t::lib::Mocks::mock_preference( 'RequireStrongPassword', 0 );
$patron->set_password({ password => $password });
$s->opac_auth( $patron->userid, $password );