From d7689c401afae4e93a7c36d32b8db33b4ad077a1 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 26 Jan 2024 13:30:48 +0000 Subject: [PATCH] Bug 30645: (QA follow-up): Tidy --- t/db_dependent/selenium/patrons_search.t | 36 +++++++++++++++--------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/t/db_dependent/selenium/patrons_search.t b/t/db_dependent/selenium/patrons_search.t index 78ea22209c1..de957db6486 100755 --- a/t/db_dependent/selenium/patrons_search.t +++ b/t/db_dependent/selenium/patrons_search.t @@ -181,18 +181,22 @@ subtest 'Search patrons' => sub { )->store; push @cleanup, $attribute_type, $attribute_type_searchable_1, $attribute_type_searchable_2, $attribute_type_searchable_not_default; - $patrons[0]->extended_attributes([ - { code => $attribute_type->code, attribute => 'test_attr_1' }, - { code => $attribute_type_searchable_1->code, attribute => 'test_attr_2'}, - { code => $attribute_type_searchable_2->code, attribute => 'test_attr_3'}, - { code => $attribute_type_searchable_not_default->code, attribute => 'test_attr_4'}, - ]); - $patrons[1]->extended_attributes([ - { code => $attribute_type->code, attribute => 'test_attr_1' }, - { code => $attribute_type_searchable_1->code, attribute => 'test_attr_2'}, - { code => $attribute_type_searchable_2->code, attribute => 'test_attr_3'}, - { code => $attribute_type_searchable_not_default->code, attribute => 'test_attr_4'}, - ]); + $patrons[0]->extended_attributes( + [ + { code => $attribute_type->code, attribute => 'test_attr_1' }, + { code => $attribute_type_searchable_1->code, attribute => 'test_attr_2' }, + { code => $attribute_type_searchable_2->code, attribute => 'test_attr_3' }, + { code => $attribute_type_searchable_not_default->code, attribute => 'test_attr_4' }, + ] + ); + $patrons[1]->extended_attributes( + [ + { code => $attribute_type->code, attribute => 'test_attr_1' }, + { code => $attribute_type_searchable_1->code, attribute => 'test_attr_2' }, + { code => $attribute_type_searchable_2->code, attribute => 'test_attr_3' }, + { code => $attribute_type_searchable_not_default->code, attribute => 'test_attr_4' }, + ] + ); my $total_number_of_patrons = Koha::Patrons->search->count; my $table_id = "memberresultst"; @@ -310,12 +314,16 @@ subtest 'Search patrons' => sub { $s->submit_form; sleep $DT_delay && $s->wait_for_ajax; - is( $driver->find_element('//div[@id="'.$table_id.'_info"]')->get_text, sprintf('Showing 1 to %s of %s entries (filtered from %s total entries)', 2, 2, $total_number_of_patrons), 'Searching on a searchable attribute returns correct results' ); + is( + $driver->find_element( '//div[@id="' . $table_id . '_info"]' )->get_text, + sprintf( 'Showing 1 to %s of %s entries (filtered from %s total entries)', 2, 2, $total_number_of_patrons ), + 'Searching on a searchable attribute returns correct results' + ); # clear form $driver->find_element('//form[@id="patron_search_form"]//*[@id="clear_search"]')->click(); - $s->fill_form( { search_patron_filter => 'test_attr_3' } ); # Terms must be split + $s->fill_form( { search_patron_filter => 'test_attr_3' } ); # Terms must be split $s->submit_form; sleep $DT_delay && $s->wait_for_ajax; -- 2.30.2