Lines 39-75
my $opac_base_url = $s->opac_base_url;
Link Here
|
39 |
my $base_url = $s->base_url; |
39 |
my $base_url = $s->base_url; |
40 |
my $builder = t::lib::TestBuilder->new; |
40 |
my $builder = t::lib::TestBuilder->new; |
41 |
|
41 |
|
|
|
42 |
my $marcflavour = C4::Context->preference('marcflavour') || 'MARC21'; |
43 |
|
42 |
my $SearchEngine_value = C4::Context->preference('SearchEngine'); |
44 |
my $SearchEngine_value = C4::Context->preference('SearchEngine'); |
43 |
C4::Context->set_preference('SearchEngine', 'Zebra'); |
45 |
C4::Context->set_preference('SearchEngine', 'Zebra'); |
44 |
|
46 |
|
45 |
my $mock_zebra = t::lib::Mocks::Zebra->new( |
47 |
my $mock_zebra = t::lib::Mocks::Zebra->new( |
46 |
{ |
48 |
{ |
47 |
koha_conf => $ENV{KOHA_CONF}, |
49 |
marcflavour => $marcflavour, |
48 |
user => $ENV{KOHA_USER}, |
|
|
49 |
password => $ENV{KOHA_PASS}, |
50 |
intranet => $ENV{KOHA_INTRANET_URL}, |
51 |
opac => $ENV{KOHA_OPAC_URL}, |
52 |
} |
50 |
} |
53 |
); |
51 |
); |
54 |
|
52 |
|
55 |
subtest 'OPAC - Remove from cart' => sub { |
53 |
subtest 'OPAC - Remove from cart' => sub { |
56 |
plan tests => 22; |
54 |
plan tests => 4; |
57 |
|
55 |
|
58 |
#-------------------------------- Test with greek and corean chars; |
56 |
my $sourcedir = dirname(__FILE__) . "/../data"; |
59 |
# launch the zebra saerch process |
57 |
$mock_zebra->load_records( |
|
|
58 |
sprintf( "%s/%s/zebraexport/biblio", $sourcedir, lc($marcflavour) ), |
59 |
'iso2709', 'biblios', 1 ); |
60 |
$mock_zebra->launch_zebra; |
60 |
$mock_zebra->launch_zebra; |
61 |
# launch the zebra index process |
|
|
62 |
$mock_zebra->launch_indexer; |
63 |
|
64 |
my $marcflavour = C4::Context->preference('marcflavour') || 'MARC21'; |
65 |
|
66 |
my $testdir = File::Spec->rel2abs( dirname(__FILE__) . '/../www/'); |
67 |
my $file = |
68 |
$marcflavour eq 'UNIMARC' |
69 |
? "$testdir/data/unimarcutf8record.mrc" |
70 |
: "$testdir/data/marc21utf8record.mrc"; |
71 |
|
72 |
my $batch_id = $mock_zebra->load_records($file); |
73 |
|
61 |
|
74 |
# We need to prevent scrolling to prevent the floating toolbar from overlapping buttons we are testing |
62 |
# We need to prevent scrolling to prevent the floating toolbar from overlapping buttons we are testing |
75 |
my $window_size = $driver->get_window_size(); |
63 |
my $window_size = $driver->get_window_size(); |
Lines 107-113
subtest 'OPAC - Remove from cart' => sub {
Link Here
|
107 |
# Reset window size |
95 |
# Reset window size |
108 |
$driver->set_window_size($window_size->{'height'}, $window_size->{'width'}); |
96 |
$driver->set_window_size($window_size->{'height'}, $window_size->{'width'}); |
109 |
|
97 |
|
110 |
$mock_zebra->clean_records($batch_id); |
|
|
111 |
$mock_zebra->cleanup; |
98 |
$mock_zebra->cleanup; |
112 |
}; |
99 |
}; |
113 |
|
100 |
|
114 |
- |
|
|