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

(-)a/t/db_dependent/selenium/patrons_search.t (-2 / +3 lines)
Lines 102-111 subtest 'Search patrons' => sub { Link Here
102
    is( scalar @adv_options, 12, 'Invalid option not added when DefaultPatronSearchFields is populated with an invalid field');
102
    is( scalar @adv_options, 12, 'Invalid option not added when DefaultPatronSearchFields is populated with an invalid field');
103
    is( scalar @filter_options, 12, 'Invalid filter option not added when DefaultPatronSearchFields is populated with an invalid field');
103
    is( scalar @filter_options, 12, 'Invalid filter option not added when DefaultPatronSearchFields is populated with an invalid field');
104
    C4::Context->set_preference('DefaultPatronSearchFields',"");
104
    C4::Context->set_preference('DefaultPatronSearchFields',"");
105
    $s->fill_form( { searchmember_filter => 'test_patron' } );
105
    $s->fill_form( { search_patron_filter => 'test_patron' } );
106
    $s->submit_form;
106
    $s->submit_form;
107
    my $first_patron = $patrons[0];
107
    my $first_patron = $patrons[0];
108
108
109
    $s->wait_for_datatable_visible('//table[@id="memberresultst"]');
109
    my @td = $driver->find_elements('//table[@id="memberresultst"]/tbody/tr/td');
110
    my @td = $driver->find_elements('//table[@id="memberresultst"]/tbody/tr/td');
110
    like ($td[2]->get_text, qr[\Q$firstname\E],
111
    like ($td[2]->get_text, qr[\Q$firstname\E],
111
        'Column "Name" should be the 3rd and contain the firstname correctly filtered'
112
        'Column "Name" should be the 3rd and contain the firstname correctly filtered'
Lines 116-122 subtest 'Search patrons' => sub { Link Here
116
    like ($td[2]->get_text, qr[\Q$email\E],
117
    like ($td[2]->get_text, qr[\Q$email\E],
117
        'Column "Name" should be the 3rd and contain the email address correctly filtered'
118
        'Column "Name" should be the 3rd and contain the email address correctly filtered'
118
    );
119
    );
119
    is( $td[5]->get_text, $branchname,
120
    is( $td[4]->get_text, $branchname,
120
        'Column "Library" should be the 6th and contain the html tags - they have been html filtered'
121
        'Column "Library" should be the 6th and contain the html tags - they have been html filtered'
121
    );
122
    );
122
    is( $td[9]->get_text, $borrowernotes_displayed,
123
    is( $td[9]->get_text, $borrowernotes_displayed,
(-)a/t/lib/Selenium.pm (-1 / +19 lines)
Lines 193-198 sub wait_for_element_visible { Link Here
193
    return $elt;
193
    return $elt;
194
}
194
}
195
195
196
sub wait_for_datatable_visible {
197
    my ( $self, $xpath_selector ) = @_;
198
199
    my ($visible, $elt);
200
    $self->remove_error_handler;
201
    my $max_retries = $self->max_retries;
202
    my $i;
203
    while ( not $visible ) {
204
        $elt = eval {$self->driver->find_element($xpath_selector . '//td[class="dataTables_empty"]')};
205
        $visible = $elt && $elt->get_text ne 'No data available in table';
206
        $self->driver->pause(1000) unless $visible;
207
208
        die "Cannot wait more for element '$xpath_selector' to be visible"
209
            if $max_retries <= ++$i
210
    }
211
    $self->add_error_handler;
212
    return $elt;
213
}
214
196
sub show_all_entries {
215
sub show_all_entries {
197
    my ( $self, $xpath_selector ) = @_;
216
    my ( $self, $xpath_selector ) = @_;
198
217
199
- 

Return to bug 30063