From f08bb43222eada19d26a7d69746bb3a356fd3996 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 26 Apr 2024 08:12:05 +0100 Subject: [PATCH] Bug 35362: (follow-up) Fix guaruntor preview modal close in test This patch updates the selenium test to correct the selector used to close the preview modal as it changed with this patchset. Signed-off-by: Katrin Fischer --- t/db_dependent/selenium/patrons_search.t | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/selenium/patrons_search.t b/t/db_dependent/selenium/patrons_search.t index 50bc251756..ac8eb80623 100755 --- a/t/db_dependent/selenium/patrons_search.t +++ b/t/db_dependent/selenium/patrons_search.t @@ -520,11 +520,13 @@ subtest 'Search patrons in modal' => sub { sprintf( "%s %s %s (%s)", $patron->title, $patron->firstname, $patron->surname, $patron->cardnumber - ) + ), + 'Patron preview modal has correct content' ); # Close the patron preview modal - $driver->find_element('//div[@id="patron_preview_modal"]//input[@class="close"]')->click; + $driver->find_element('//*[@id="patron_preview_modal"]/div[2]/fieldset/button')->click; + $s->wait_for_element_hidden('//div[@id="patron_preview_modal"]'); # Select patron 2 @@ -539,7 +541,8 @@ subtest 'Search patrons in modal' => sub { # => The guarantor block has the info of the selected patron is( $driver->find_element('//a[@class="new_guarantor_link"]')->get_text(), - sprintf( "%s %s (%s)", $patron->firstname, $patron->surname, $patron->cardnumber ) + sprintf( "%s %s (%s)", $patron->firstname, $patron->surname, $patron->cardnumber ), + 'Guarantor block contains info of selected patron' ); is( $driver->find_element('//input[@class="new_guarantor_id noEnterSubmit"]')->get_value(), -- 2.39.5