From 4f524635516325bfe6b56ddf96476c03086956b6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 27 Aug 2024 08:50:38 +0200 Subject: [PATCH] Bug 35402: Fix some selenium tests Signed-off-by: Katrin Fischer --- .../prog/en/modules/members/member.tt | 2 +- t/db_dependent/selenium/administration_tasks.t | 2 +- t/db_dependent/selenium/authentication_2fa.t | 16 ++++++++-------- t/db_dependent/selenium/patrons_search.t | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt index 499844eb3e..5403aee176 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -82,7 +82,7 @@ [% END %] [% END %]
  • -
  • New list
  • +
  • New list
  • [% END %] diff --git a/t/db_dependent/selenium/administration_tasks.t b/t/db_dependent/selenium/administration_tasks.t index f9506bd965..6593a5eb9a 100755 --- a/t/db_dependent/selenium/administration_tasks.t +++ b/t/db_dependent/selenium/administration_tasks.t @@ -206,7 +206,7 @@ SKIP: { $s->submit_form; # Make sure the category is updated - $s->driver->find_element('//div[@class="alert alert-info"]'); + $s->driver->find_element('//div[@class="dialog message"]'); # Select "Show all" in the datatable "Show x entries" dropdown list to make sure our category is not hidden $s->show_all_entries('//div[@id="patron_categories_wrapper"]'); diff --git a/t/db_dependent/selenium/authentication_2fa.t b/t/db_dependent/selenium/authentication_2fa.t index 43e63e14fa..f390e357d4 100755 --- a/t/db_dependent/selenium/authentication_2fa.t +++ b/t/db_dependent/selenium/authentication_2fa.t @@ -68,13 +68,13 @@ SKIP: { like( $driver->get_title, qr(Two-factor authentication), 'Must be on the page with the pref on' ); is( - $driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="two-factor-status"]' )->get_text, + $driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, 'Status: Disabled', '2FA is disabled' ); is( - $driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="two-factor-status"]' )->get_text, + $driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, '', # 'Status: Enabled' is not shown '2FA is disabled' ); @@ -100,13 +100,13 @@ SKIP: { $s->wait_for_ajax; $driver->get($s->base_url . q|members/two_factor_auth.pl|); is( - $driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="two-factor-status"]' )->get_text, + $driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, '', # 'Status: Disabled' is not shown '2FA is enabled' ); is( - $driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="two-factor-status"]' )->get_text, + $driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, 'Status: Enabled', '2FA is enabled' ); @@ -311,13 +311,13 @@ SKIP: { $driver->get( $s->base_url . q|members/two_factor_auth.pl| ); is( - $driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="two-factor-status"]' )->get_text, + $driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, '', # 'Status: Disabled' is not shown '2FA is enabled' ); is( - $driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="two-factor-status"]' )->get_text, + $driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, 'Status: Enabled', '2FA is enabled' ); @@ -325,13 +325,13 @@ SKIP: { $driver->find_element('//form[@id="two-factor-auth"]//input[@type="submit"]')->click; is( - $driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="two-factor-status"]' )->get_text, + $driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, 'Status: Disabled', '2FA is disabled' ); is( - $driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="two-factor-status"]' )->get_text, + $driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, '', # 'Status: Enabled' is not shown '2FA is disabled' ); diff --git a/t/db_dependent/selenium/patrons_search.t b/t/db_dependent/selenium/patrons_search.t index 18049aa0d7..e2867d2d1d 100755 --- a/t/db_dependent/selenium/patrons_search.t +++ b/t/db_dependent/selenium/patrons_search.t @@ -394,7 +394,7 @@ subtest 'Search patrons' => sub { is( $patron_selected_text, "Patrons selected: 3", "Three patrons still selected" ); $driver->find_element('//*[@id="patronlist-menu"]')->click; - $driver->find_element('//a[@class="patron-list-add"]')->click; + $driver->find_element('//a[@class="patron-list-add dropdown-item"]')->click; my $patron_list_name = "my new list"; $driver->find_element('//input[@id="new_patron_list"]')->send_keys($patron_list_name); $driver->find_element('//button[@id="add_to_patron_list_submit"]')->click; -- 2.39.5