From c8199147b1054a1c4fe713668ee83a9654e5cfaa Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 22 Apr 2022 11:42:09 +0200 Subject: [PATCH] Bug 30595: Prevent update_child_to_adult.t to fail randomly t/db_dependent/selenium/update_child_to_adult.t .. # Looks like you planned 3 tests but ran 2. # Failed test 'Update child to adult' # at t/db_dependent/selenium/update_child_to_adult.t line 132. # Looks like you planned 3 tests but ran 2. # Looks like you failed 1 test of 2 run. t/db_dependent/selenium/update_child_to_adult.t .. 1/1 # Failed test 'Update child to patron' # at t/db_dependent/selenium/update_child_to_adult.t line 153. Cannot wait more for element '//input[@type="submit"]' to be visible at /kohadevbox/koha/t/lib/Selenium.pm line 189. It happens when there are too many patron's categories and the submit button is not in the viewport. Signed-off-by: Fridolin Somers --- t/db_dependent/selenium/update_child_to_adult.t | 1 + 1 file changed, 1 insertion(+) diff --git a/t/db_dependent/selenium/update_child_to_adult.t b/t/db_dependent/selenium/update_child_to_adult.t index f821fe6399..5dbdec5b6d 100755 --- a/t/db_dependent/selenium/update_child_to_adult.t +++ b/t/db_dependent/selenium/update_child_to_adult.t @@ -122,6 +122,7 @@ subtest 'Update child to patron' => sub { my $handles = $driver->get_window_handles; $driver->switch_to_window($handles->[1]); $driver->find_element('//input[@id="catcode'.$patron_category_A->categorycode.'"]')->click; + $driver->set_window_size(1024, 768); $s->submit_form; is( $child->get_from_storage->categorycode, $patron_category_A->categorycode, 'The child should now be an adult!' ); -- 2.39.5