From 190ab37812678f0d9ce2d7465bb4fa5971fdb061 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 4 Mar 2024 14:46:07 +0100 Subject: [PATCH] Bug 35329: Fix selenium tests if no fund exist Signed-off-by: Jonathan Druart --- t/db_dependent/selenium/patrons_search.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/selenium/patrons_search.t b/t/db_dependent/selenium/patrons_search.t index f757ea7fb0..43d0ff9e8c 100755 --- a/t/db_dependent/selenium/patrons_search.t +++ b/t/db_dependent/selenium/patrons_search.t @@ -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(); -- 2.39.5