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

(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (-1 / +1 lines)
Lines 281-287 $(document).ready(function() { Link Here
281
        return false;
281
        return false;
282
    });
282
    });
283
        console.log("show checkouts handler attached")
283
        console.log("show checkouts handler attached")
284
284
        window._pageFullyReady = {};
285
    }
285
    }
286
    ,2000);
286
    ,2000);
287
287
(-)a/t/db_dependent/selenium/regressions.t (+2 lines)
Lines 186-191 subtest 'Display circulation table correctly' => sub { Link Here
186
          . "/circ/circulation.pl?borrowernumber="
186
          . "/circ/circulation.pl?borrowernumber="
187
          . $patron->borrowernumber );
187
          . $patron->borrowernumber );
188
188
189
    $s->wait_for_page_fully_ready;
189
    # Display the table clicking on the "Show checkouts" button
190
    # Display the table clicking on the "Show checkouts" button
190
    $driver->find_element('//a[@id="issues-table-load-now-button"]')->click;
191
    $driver->find_element('//a[@id="issues-table-load-now-button"]')->click;
191
192
Lines 313-318 subtest 'Encoding in session variables' => sub { Link Here
313
            $driver->find_element('//input[@id="barcode"]')->send_keys( $item->barcode );
314
            $driver->find_element('//input[@id="barcode"]')->send_keys( $item->barcode );
314
            $driver->find_element('//fieldset[@id="circ_circulation_issue"]/button[@type="submit"]')->click;
315
            $driver->find_element('//fieldset[@id="circ_circulation_issue"]/button[@type="submit"]')->click;
315
316
317
            $s->wait_for_page_fully_ready;
316
            # Display the table clicking on the "Show checkouts" button
318
            # Display the table clicking on the "Show checkouts" button
317
            $driver->find_element('//a[@id="issues-table-load-now-button"]')
319
            $driver->find_element('//a[@id="issues-table-load-now-button"]')
318
              ->click;
320
              ->click;
(-)a/t/lib/Selenium.pm (-1 / +22 lines)
Lines 265-270 sub click_when_visible { Link Here
265
    $elt->click unless $clicked; # finally Raise the error
265
    $elt->click unless $clicked; # finally Raise the error
266
}
266
}
267
267
268
269
sub wait_for_page_fully_ready {
270
    my ($self) = @_;
271
272
    my $is_ready;
273
    my $max_retries = $self->max_retries;
274
275
    my $i;
276
    while ( not $is_ready ) {
277
        warn "############# waiting (" . $i . ")";
278
        $is_ready = $self->driver->execute_script('return window._pageFullyReady');
279
        $self->driver->pause(333) unless $is_ready;
280
281
        if ( $max_retries <= ++$i ) {
282
            $self->capture( $self->driver );
283
            $self->driver->quit();
284
            die "Cannot wait more for page to be fully ready (wait_for_page_fully_ready)";
285
        }
286
    }
287
}
288
289
268
sub max_retries { 10 }
290
sub max_retries { 10 }
269
291
270
=head1 NAME
292
=head1 NAME
271
- 

Return to bug 35506