Lines 237-248
SKIP: {
Link Here
|
237 |
#Place holds |
237 |
#Place holds |
238 |
$driver->get($base_url."/reserve/request.pl?borrowernumber=$borrowernumber&biblionumber=".$biblionumbers[0]); |
238 |
$driver->get($base_url."/reserve/request.pl?borrowernumber=$borrowernumber&biblionumber=".$biblionumbers[0]); |
239 |
$driver->find_element('//form[@id="hold-request-form"]//button[@type="submit"]')->click; # Biblio level |
239 |
$driver->find_element('//form[@id="hold-request-form"]//button[@type="submit"]')->click; # Biblio level |
|
|
240 |
$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) |
240 |
my $patron = Koha::Patrons->find($borrowernumber); |
241 |
my $patron = Koha::Patrons->find($borrowernumber); |
241 |
is( $patron->holds->count, 1, ); |
242 |
is( $patron->holds->count, 1, ); |
242 |
|
243 |
|
243 |
$driver->get($base_url."/reserve/request.pl?borrowernumber=$borrowernumber&biblionumber=".$biblionumbers[1]); |
244 |
$driver->get($base_url."/reserve/request.pl?borrowernumber=$borrowernumber&biblionumber=".$biblionumbers[1]); |
244 |
$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 |
245 |
$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 |
245 |
$driver->find_element('//form[@id="hold-request-form"]//button[@type="submit"]')->click; |
246 |
$driver->find_element('//form[@id="hold-request-form"]//button[@type="submit"]')->click; |
|
|
247 |
$driver->pause(1000); |
246 |
is( $patron->holds->count, 2, ); |
248 |
is( $patron->holds->count, 2, ); |
247 |
|
249 |
|
248 |
time_diff("holds"); |
250 |
time_diff("holds"); |
249 |
- |
|
|