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

(-)a/t/db_dependent/selenium/opac_holds.t (-46 lines)
Lines 325-336 SKIP: { Link Here
325
        DelBiblio($second_biblionumber);
325
        DelBiblio($second_biblionumber);
326
    }
326
    }
327
327
328
=head3 withdraw_items
329
330
Withdraws items by setting their 'withdrawn' flag to 1.
331
332
=cut
333
334
    sub withdraw_items {
328
    sub withdraw_items {
335
        my $dbh = C4::Context->dbh;
329
        my $dbh = C4::Context->dbh;
336
        $dbh->do(
330
        $dbh->do(
Lines 338-349 Withdraws items by setting their 'withdrawn' flag to 1. Link Here
338
        );
332
        );
339
    }
333
    }
340
334
341
=head3 set_holdallowed_not_allowed
342
343
Set holdallowed as not_allowed in the circulation rules
344
345
=cut
346
347
    sub set_holdallowed_not_allowed {
335
    sub set_holdallowed_not_allowed {
348
        Koha::CirculationRules->set_rules(
336
        Koha::CirculationRules->set_rules(
349
            {
337
            {
Lines 356-370 Set holdallowed as not_allowed in the circulation rules Link Here
356
        );
344
        );
357
    }
345
    }
358
346
359
=head3 set_onshelfholds
360
361
Set holdallowed as not_allowed in the circulation rules
362
0 - "If any unavailable"
363
1 - "Yes"
364
2 - "If all unavailable"
365
366
=cut
367
368
    sub set_onshelfholds {
347
    sub set_onshelfholds {
369
        my ($rule_value) = @_;
348
        my ($rule_value) = @_;
370
        Koha::CirculationRules->set_rule(
349
        Koha::CirculationRules->set_rule(
Lines 378-389 Set holdallowed as not_allowed in the circulation rules Link Here
378
        );
357
        );
379
    }
358
    }
380
359
381
=head3 search_page_hold_button_absent
382
383
Function to visit search results and test for the absence of place hold buttons
384
385
=cut
386
387
    sub search_page_hold_button_absent {
360
    sub search_page_hold_button_absent {
388
        my ($message) = @_;
361
        my ($message) = @_;
389
362
Lines 402-413 Function to visit search results and test for the absence of place hold buttons Link Here
402
        );
375
        );
403
    }
376
    }
404
377
405
=head3 search_page_hold_button_present
406
407
Function to visit search results and test for the presence of place hold buttons
408
409
=cut
410
411
    sub search_page_hold_button_present {
378
    sub search_page_hold_button_present {
412
        my ($message) = @_;
379
        my ($message) = @_;
413
380
Lines 424-435 Function to visit search results and test for the presence of place hold buttons Link Here
424
        );
391
        );
425
    }
392
    }
426
393
427
=head3 detail_page_hold_button_absent
428
429
Visits the detail page and tests the absence of the place hold button
430
431
=cut
432
433
    sub detail_page_hold_button_absent {
394
    sub detail_page_hold_button_absent {
434
        my ($message) = @_;
395
        my ($message) = @_;
435
        $driver->get( $s->opac_base_url . "opac-detail.pl?biblionumber=" . $biblionumber );
396
        $driver->get( $s->opac_base_url . "opac-detail.pl?biblionumber=" . $biblionumber );
Lines 441-452 Visits the detail page and tests the absence of the place hold button Link Here
441
        );
402
        );
442
    }
403
    }
443
404
444
=head3 detail_page_hold_button_present
445
446
Visits the detail page and tests the presence of the place hold button
447
448
=cut
449
450
    sub detail_page_hold_button_present {
405
    sub detail_page_hold_button_present {
451
        my ($message) = @_;
406
        my ($message) = @_;
452
        $driver->get( $s->opac_base_url . "opac-detail.pl?biblionumber=" . $biblionumber );
407
        $driver->get( $s->opac_base_url . "opac-detail.pl?biblionumber=" . $biblionumber );
453
- 

Return to bug 34886