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

(-)a/t/db_dependent/selenium/patrons_search.t (-8 / +12 lines)
Lines 63-70 my $firstname = q|<strong>fir's"tname</strong> \123 ❤|; Link Here
63
my $address                 = q|<strong>add'res"s</strong> \123 ❤|;
63
my $address                 = q|<strong>add'res"s</strong> \123 ❤|;
64
my $email                   = q|a<strong>bad_email</strong>@example\123 ❤.com|;
64
my $email                   = q|a<strong>bad_email</strong>@example\123 ❤.com|;
65
my (
65
my (
66
    $attribute_type, $attribute_type_searchable_1, $attribute_type_searchable_2,
66
    $attribute_type,                        $attribute_type_searchable_1, $attribute_type_searchable_2,
67
    $attribute_type_searchable_not_default, $patron_category, $library
67
    $attribute_type_searchable_not_default, $patron_category,             $library
68
);
68
);
69
sub setup {
69
sub setup {
70
    $patron_category = $builder->build_object(
70
    $patron_category = $builder->build_object(
Lines 75-83 sub setup { Link Here
75
    );
75
    );
76
    push @cleanup, $patron_category;
76
    push @cleanup, $patron_category;
77
77
78
    $library = $builder->build_object(
78
    $library = $builder->build_object( { class => 'Koha::Libraries', value => { branchname => $branchname } } );
79
        { class => 'Koha::Libraries', value => { branchname => $branchname } }
80
    );
81
    push @cleanup, $library;
79
    push @cleanup, $library;
82
80
83
    my @patrons;
81
    my @patrons;
Lines 360-373 subtest 'Search patrons' => sub { Link Here
360
358
361
        plan tests => 1;
359
        plan tests => 1;
362
360
363
        $patron_category->replace_library_limits( [$library->id] );
361
        $patron_category->replace_library_limits( [ $library->id ] );
364
        C4::Context->set_preference( 'PatronsPerPage', 5 );
362
        C4::Context->set_preference( 'PatronsPerPage', 5 );
365
        $driver->get( $base_url . "/members/members-home.pl" );
363
        $driver->get( $base_url . "/members/members-home.pl" );
366
        clear_filters();
364
        clear_filters();
367
        $s->fill_form( { 'search_patron_filter' => 'test_patron' } );
365
        $s->fill_form( { 'search_patron_filter' => 'test_patron' } );
368
        $s->submit_form;
366
        $s->submit_form;
369
        sleep $DT_delay && $s->wait_for_ajax;
367
        sleep $DT_delay && $s->wait_for_ajax;
370
        is( $driver->find_element('//div[@id="'.$table_id.'_info"]')->get_text, sprintf('Showing 1 to %s of %s entries (filtered from %s total entries)', $PatronsPerPage, 26, $total_number_of_patrons), 'Search works when category of patrons is limited to a library we are not signed in at' );
368
        is(
369
            $driver->find_element( '//div[@id="' . $table_id . '_info"]' )->get_text,
370
            sprintf(
371
                'Showing 1 to %s of %s entries (filtered from %s total entries)', $PatronsPerPage, 26,
372
                $total_number_of_patrons
373
            ),
374
            'Search works when category of patrons is limited to a library we are not signed in at'
375
        );
371
376
372
    };
377
    };
373
378
374
- 

Return to bug 38444