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

(-)a/t/db_dependent/selenium/basic_workflow.t (-1 / +2 lines)
Lines 242-253 SKIP: { Link Here
242
    #Place holds
242
    #Place holds
243
    $driver->get($base_url."/reserve/request.pl?borrowernumber=$borrowernumber&biblionumber=".$biblionumbers[0]);
243
    $driver->get($base_url."/reserve/request.pl?borrowernumber=$borrowernumber&biblionumber=".$biblionumbers[0]);
244
    $driver->find_element('//form[@id="hold-request-form"]//button[@type="submit"]')->click; # Biblio level
244
    $driver->find_element('//form[@id="hold-request-form"]//button[@type="submit"]')->click; # Biblio level
245
    $driver->pause(1000); # This seems wrong, since bug 19618 the hold is created async with an AJAX call. Not sure what is happening here but the next statements are exectuted before the hold is created and the count is wrong (still 0)
245
    my $patron = Koha::Patrons->find($borrowernumber);
246
    my $patron = Koha::Patrons->find($borrowernumber);
246
    is( $patron->holds->count, 1, );
247
    is( $patron->holds->count, 1, );
247
248
248
    $driver->get($base_url."/reserve/request.pl?borrowernumber=$borrowernumber&biblionumber=".$biblionumbers[1]);
249
    $driver->get($base_url."/reserve/request.pl?borrowernumber=$borrowernumber&biblionumber=".$biblionumbers[1]);
249
    $driver->find_element('//form[@id="hold-request-form"]//input[@type="radio"]')->click; # Item level, there is only 1 item per bib so we are safe
250
    $driver->find_element('//form[@id="hold-request-form"]//input[@type="radio"]')->click; # Item level, there is only 1 item per bib so we are safe
250
    $driver->find_element('//form[@id="hold-request-form"]//button[@type="submit"]')->click;
251
    $driver->find_element('//form[@id="hold-request-form"]//button[@type="submit"]')->click;
252
    $driver->pause(1000);
251
    is( $patron->holds->count, 2, );
253
    is( $patron->holds->count, 2, );
252
254
253
    time_diff("holds");
255
    time_diff("holds");
254
- 

Return to bug 22898