View | Details | Raw Unified | Return to bug 30645
Collapse All | Expand All

(-)a/t/db_dependent/selenium/patrons_search.t (-15 / +22 lines)
Lines 181-198 subtest 'Search patrons' => sub { Link Here
181
    )->store;
181
    )->store;
182
    push @cleanup, $attribute_type, $attribute_type_searchable_1, $attribute_type_searchable_2, $attribute_type_searchable_not_default;
182
    push @cleanup, $attribute_type, $attribute_type_searchable_1, $attribute_type_searchable_2, $attribute_type_searchable_not_default;
183
183
184
    $patrons[0]->extended_attributes([
184
    $patrons[0]->extended_attributes(
185
        { code => $attribute_type->code, attribute => 'test_attr_1' },
185
        [
186
        { code => $attribute_type_searchable_1->code, attribute => 'test_attr_2'},
186
            { code => $attribute_type->code,                        attribute => 'test_attr_1' },
187
        { code => $attribute_type_searchable_2->code, attribute => 'test_attr_3'},
187
            { code => $attribute_type_searchable_1->code,           attribute => 'test_attr_2' },
188
        { code => $attribute_type_searchable_not_default->code, attribute => 'test_attr_4'},
188
            { code => $attribute_type_searchable_2->code,           attribute => 'test_attr_3' },
189
    ]);
189
            { code => $attribute_type_searchable_not_default->code, attribute => 'test_attr_4' },
190
    $patrons[1]->extended_attributes([
190
        ]
191
        { code => $attribute_type->code, attribute => 'test_attr_1' },
191
    );
192
        { code => $attribute_type_searchable_1->code, attribute => 'test_attr_2'},
192
    $patrons[1]->extended_attributes(
193
        { code => $attribute_type_searchable_2->code, attribute => 'test_attr_3'},
193
        [
194
        { code => $attribute_type_searchable_not_default->code, attribute => 'test_attr_4'},
194
            { code => $attribute_type->code,                        attribute => 'test_attr_1' },
195
    ]);
195
            { code => $attribute_type_searchable_1->code,           attribute => 'test_attr_2' },
196
            { code => $attribute_type_searchable_2->code,           attribute => 'test_attr_3' },
197
            { code => $attribute_type_searchable_not_default->code, attribute => 'test_attr_4' },
198
        ]
199
    );
196
200
197
    my $total_number_of_patrons = Koha::Patrons->search->count;
201
    my $total_number_of_patrons = Koha::Patrons->search->count;
198
    my $table_id = "memberresultst";
202
    my $table_id = "memberresultst";
Lines 310-321 subtest 'Search patrons' => sub { Link Here
310
    $s->submit_form;
314
    $s->submit_form;
311
    sleep $DT_delay && $s->wait_for_ajax;
315
    sleep $DT_delay && $s->wait_for_ajax;
312
316
313
    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' );
317
    is(
318
        $driver->find_element( '//div[@id="' . $table_id . '_info"]' )->get_text,
319
        sprintf( 'Showing 1 to %s of %s entries (filtered from %s total entries)', 2, 2, $total_number_of_patrons ),
320
        'Searching on a searchable attribute returns correct results'
321
    );
314
322
315
    # clear form
323
    # clear form
316
    $driver->find_element('//form[@id="patron_search_form"]//*[@id="clear_search"]')->click();
324
    $driver->find_element('//form[@id="patron_search_form"]//*[@id="clear_search"]')->click();
317
325
318
    $s->fill_form( { search_patron_filter => 'test_attr_3' } ); # Terms must be split
326
    $s->fill_form( { search_patron_filter => 'test_attr_3' } );    # Terms must be split
319
    $s->submit_form;
327
    $s->submit_form;
320
    sleep $DT_delay && $s->wait_for_ajax;
328
    sleep $DT_delay && $s->wait_for_ajax;
321
329
322
- 

Return to bug 30645