Bug 35329: Fix selenium tests if no fund exist

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2024-03-04 14:46:07 +01:00
parent aa63943c2f
commit 190ab37812
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0

View file

@ -539,7 +539,9 @@ subtest 'Search patrons in modal' => sub {
$s->auth;
# Go to the add patron form
$driver->get( $base_url . "/admin/aqbudgets.pl?op=add_form&budget_id=1&budget_period_id=1" );
my $fund = $builder->build_object( { class => 'Koha::Acquisition::Funds' } );
push @cleanup, $fund->budget, $fund;
$driver->get( $base_url . sprintf "/admin/aqbudgets.pl?op=add_form&budget_id=%s&budget_period_id=%s", $fund->budget_id, $fund->budget_period_id );
# Click "Select owner"
$driver->find_element('//a[@href="#patron_search_modal_owner"]')->click();