Bug 32926: Fix selenium tests

We should not rely on existing data, and we should remove data at the end.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-02-23 10:05:38 +01:00 committed by Tomas Cohen Arazi
parent 28a0c039fe
commit f16baef879
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -40,12 +40,12 @@ my $base_url = $s->base_url;
# Adjust the height and width of the generated screenshots
#$driver->set_window_size( 2160, 991 ); # Height, then Width
my $patron = $builder->build_object( { class => 'Koha::Patrons', value => { flags => 1, branchcode => 'CPL' } } );
my $patron = $builder->build_object( { class => 'Koha::Patrons', value => { flags => 1 } } );
my $password = Koha::AuthUtils::generate_password( $patron->category );
t::lib::Mocks::mock_preference( 'RequireStrongPassword', 0 );
$patron->set_password( { password => $password } );
push @cleanup, $patron;
push @cleanup, $patron, $patron->category, $patron->library;
$s->auth( $patron->userid, $password );