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

(-)a/t/db_dependent/Search.t (-69 / +50 lines)
Lines 30-35 use Test::More tests => 3; Link Here
30
use Test::MockModule;
30
use Test::MockModule;
31
use Test::Warn;
31
use Test::Warn;
32
use t::lib::Mocks;
32
use t::lib::Mocks;
33
use t::lib::Mocks::Zebra;
33
34
34
use Koha::Caches;
35
use Koha::Caches;
35
36
Lines 41-96 use File::Find; Link Here
41
use File::Temp qw/ tempdir /;
42
use File::Temp qw/ tempdir /;
42
use File::Path;
43
use File::Path;
43
44
44
our $child;
45
our $datadir;
46
47
sub index_sample_records_and_launch_zebra {
48
    my ($datadir, $marc_type) = @_;
49
50
    my $sourcedir = dirname(__FILE__) . "/data";
51
    unlink("$datadir/zebra.log");
52
    if (-f "$sourcedir/${marc_type}/zebraexport/biblio/exported_records") {
53
        my $zebra_bib_cfg = 'zebra-biblios-dom.cfg';
54
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal -g iso2709 -d biblios init");
55
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal -g iso2709 -d biblios update $sourcedir/${marc_type}/zebraexport/biblio");
56
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal -g iso2709 -d biblios commit");
57
    }
58
    # ... and add large bib records, if present
59
    if (-f "$sourcedir/${marc_type}/zebraexport/large_biblio/exported_records.xml") {
60
        my $zebra_bib_cfg = 'zebra-biblios-dom.cfg';
61
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal -g marcxml -d biblios update $sourcedir/${marc_type}/zebraexport/large_biblio");
62
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal -g marcxml -d biblios commit");
63
    }
64
    if (-f "$sourcedir/${marc_type}/zebraexport/authority/exported_records") {
65
        my $zebra_auth_cfg = 'zebra-authorities-dom.cfg';
66
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_auth_cfg  -v none,fatal -g iso2709 -d authorities init");
67
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_auth_cfg  -v none,fatal -g iso2709 -d authorities update $sourcedir/${marc_type}/zebraexport/authority");
68
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_auth_cfg  -v none,fatal -g iso2709 -d authorities commit");
69
    }
70
71
    $child = fork();
72
    if ($child == 0) {
73
        exec("zebrasrv -f $datadir/etc/koha-conf.xml -v none,request -l $datadir/zebra.log");
74
        exit;
75
    }
76
77
    sleep(1);
78
}
79
80
sub cleanup {
81
    if ($child) {
82
        kill 9, $child;
83
84
        # Clean up the Zebra files since the child process was just shot
85
        rmtree $datadir;
86
    }
87
}
88
89
# Fall back to make sure that the Zebra process
45
# Fall back to make sure that the Zebra process
90
# and files get cleaned up
46
# and files get cleaned up
91
END {
47
our @cleanup;
92
    cleanup();
93
}
94
48
95
sub matchesExplodedTerms {
49
sub matchesExplodedTerms {
96
    my ($message, $query, @terms) = @_;
50
    my ($message, $query, @terms) = @_;
Lines 211-217 our $bibliomodule = Test::MockModule->new('C4::Biblio'); Link Here
211
165
212
sub mock_GetMarcSubfieldStructure {
166
sub mock_GetMarcSubfieldStructure {
213
    my $marc_type = shift;
167
    my $marc_type = shift;
214
    if ($marc_type eq 'marc21') {
168
    if ($marc_type eq 'MARC21') {
215
        $bibliomodule->mock('GetMarcSubfieldStructure', sub {
169
        $bibliomodule->mock('GetMarcSubfieldStructure', sub {
216
            return {
170
            return {
217
                    'biblio.biblionumber' => [{ tagfield =>  '999', tagsubfield => 'c' }],
171
                    'biblio.biblionumber' => [{ tagfield =>  '999', tagsubfield => 'c' }],
Lines 259-272 sub mock_GetMarcSubfieldStructure { Link Here
259
}
213
}
260
214
261
sub run_marc21_search_tests {
215
sub run_marc21_search_tests {
262
    $datadir = tempdir();
263
    system(dirname(__FILE__) . "/zebra_config.pl $datadir marc21");
264
216
265
    Koha::Caches->get_instance('config')->flush_all;
217
    $marcflavour = 'MARC21';
218
    my $mock_zebra = t::lib::Mocks::Zebra->new({marcflavour => $marcflavour});
219
    push @cleanup, $mock_zebra;
266
220
267
    mock_GetMarcSubfieldStructure('marc21');
221
    mock_GetMarcSubfieldStructure($marcflavour);
268
    my $context = C4::Context->new("$datadir/etc/koha-conf.xml");
269
    $context->set_context();
270
222
271
    use_ok('C4::Search', qw( getIndexes FindDuplicate SimpleSearch getRecords buildQuery searchResults ));
223
    use_ok('C4::Search', qw( getIndexes FindDuplicate SimpleSearch getRecords buildQuery searchResults ));
272
224
Lines 275-281 sub run_marc21_search_tests { Link Here
275
    $QueryAutoTruncate = 0;
227
    $QueryAutoTruncate = 0;
276
    $QueryWeightFields = 0;
228
    $QueryWeightFields = 0;
277
    $QueryFuzzy = 0;
229
    $QueryFuzzy = 0;
278
    $marcflavour = 'MARC21';
279
230
280
    my $indexes = C4::Search::getIndexes();
231
    my $indexes = C4::Search::getIndexes();
281
    is(scalar(grep(/^ti$/, @$indexes)), 1, "Title index supported");
232
    is(scalar(grep(/^ti$/, @$indexes)), 1, "Title index supported");
Lines 310-316 sub run_marc21_search_tests { Link Here
310
        'VM' => { 'imageurl' => 'bridge/dvd.png', 'summary' => '', 'itemtype' => 'VM', 'description' => 'Visual Materials' },
261
        'VM' => { 'imageurl' => 'bridge/dvd.png', 'summary' => '', 'itemtype' => 'VM', 'description' => 'Visual Materials' },
311
    );
262
    );
312
263
313
    index_sample_records_and_launch_zebra($datadir, 'marc21');
264
    my $sourcedir = dirname(__FILE__) . "/data";
265
    $mock_zebra->load_records(
266
        sprintf( "%s/%s/zebraexport/biblio", $sourcedir, lc($marcflavour) ),
267
        'iso2709', 'biblios', 1 );
268
    $mock_zebra->load_records(
269
        sprintf(
270
            "%s/%s/zebraexport/large_biblio",
271
            $sourcedir, lc($marcflavour)
272
        ),
273
        'marcxml', 'biblios', 0
274
    );
275
    $mock_zebra->load_records(
276
        sprintf( "%s/%s/zebraexport/authority", $sourcedir, lc($marcflavour) ),
277
        'iso2709', 'authorities', 1
278
    );
279
280
    $mock_zebra->launch_zebra;
314
281
315
    my ($biblionumber, $title);
282
    my ($biblionumber, $title);
316
    my $record = MARC::Record->new;
283
    my $record = MARC::Record->new;
Lines 830-847 ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],' Link Here
830
    is_deeply( $facets_info, $expected_facets_info_marc21,
797
    is_deeply( $facets_info, $expected_facets_info_marc21,
831
        "_get_facets_info returns the correct data");
798
        "_get_facets_info returns the correct data");
832
799
833
    cleanup();
800
    $mock_zebra->cleanup;
834
}
801
}
835
802
836
sub run_unimarc_search_tests {
803
sub run_unimarc_search_tests {
837
    $datadir = tempdir();
838
    system(dirname(__FILE__) . "/zebra_config.pl $datadir unimarc");
839
804
840
    Koha::Caches->get_instance('config')->flush_all;
805
    $marcflavour = 'UNIMARC';
806
    my $mock_zebra = t::lib::Mocks::Zebra->new({marcflavour => $marcflavour});
807
    push @cleanup, $mock_zebra;
841
808
842
    mock_GetMarcSubfieldStructure('unimarc');
809
    mock_GetMarcSubfieldStructure($marcflavour);
843
    my $context = C4::Context->new("$datadir/etc/koha-conf.xml");
844
    $context->set_context();
845
810
846
    use_ok('C4::Search', qw( getIndexes FindDuplicate SimpleSearch getRecords buildQuery searchResults ));
811
    use_ok('C4::Search', qw( getIndexes FindDuplicate SimpleSearch getRecords buildQuery searchResults ));
847
812
Lines 850-858 sub run_unimarc_search_tests { Link Here
850
    $QueryAutoTruncate = 0;
815
    $QueryAutoTruncate = 0;
851
    $QueryWeightFields = 0;
816
    $QueryWeightFields = 0;
852
    $QueryFuzzy = 0;
817
    $QueryFuzzy = 0;
853
    $marcflavour = 'UNIMARC';
854
818
855
    index_sample_records_and_launch_zebra($datadir, 'unimarc');
819
    my $sourcedir = dirname(__FILE__) . "/data";
820
    $mock_zebra->load_records(
821
        sprintf( "%s/%s/zebraexport/biblio", $sourcedir, lc($marcflavour) ),
822
        'iso2709', 'biblios', 1 );
823
    $mock_zebra->load_records(
824
        sprintf(
825
            "%s/%s/zebraexport/large_biblio",
826
            $sourcedir, lc($marcflavour)
827
        ),
828
        'marcxml', 'biblios', 0
829
    );
830
    $mock_zebra->load_records(
831
        sprintf( "%s/%s/zebraexport/authority", $sourcedir, lc($marcflavour) ),
832
        'iso2709', 'authorities', 1
833
    );
834
    $mock_zebra->launch_zebra;
856
835
857
    my ( $error, $marcresults, $total_hits ) = SimpleSearch("ti=Järnvägarnas efterfrågan och den svenska industrin", 0, 10);
836
    my ( $error, $marcresults, $total_hits ) = SimpleSearch("ti=Järnvägarnas efterfrågan och den svenska industrin", 0, 10);
858
    is($total_hits, 1, 'UNIMARC title search');
837
    is($total_hits, 1, 'UNIMARC title search');
Lines 916-922 sub run_unimarc_search_tests { Link Here
916
    is_deeply( $facets_info, $expected_facets_info_unimarc,
895
    is_deeply( $facets_info, $expected_facets_info_unimarc,
917
        "_get_facets_info returns the correct data");
896
        "_get_facets_info returns the correct data");
918
897
919
    cleanup();
898
    $mock_zebra->cleanup;
920
}
899
}
921
900
922
subtest 'MARC21 + DOM' => sub {
901
subtest 'MARC21 + DOM' => sub {
Lines 933-940 subtest 'UNIMARC + DOM' => sub { Link Here
933
subtest 'FindDuplicate' => sub {
912
subtest 'FindDuplicate' => sub {
934
    plan tests => 6;
913
    plan tests => 6;
935
    Koha::Caches->get_instance('config')->flush_all;
914
    Koha::Caches->get_instance('config')->flush_all;
936
    t::lib::Mocks::mock_preference('marcflavour', 'marc21' );
915
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21' );
937
    mock_GetMarcSubfieldStructure('marc21');
916
    mock_GetMarcSubfieldStructure('MARC21');
938
    my $z_searcher = Test::MockModule->new('C4::Search');
917
    my $z_searcher = Test::MockModule->new('C4::Search');
939
    $z_searcher->mock('SimpleSearch', sub {
918
    $z_searcher->mock('SimpleSearch', sub {
940
        warn shift @_;
919
        warn shift @_;
Lines 980-985 subtest 'FindDuplicate' => sub { Link Here
980
Koha::Caches->get_instance('config')->flush_all;
959
Koha::Caches->get_instance('config')->flush_all;
981
960
982
END {
961
END {
962
963
    $_->cleanup for @cleanup;
983
    my $dbh = C4::Context->dbh;
964
    my $dbh = C4::Context->dbh;
984
    # Restore visibility of subfields in OPAC
965
    # Restore visibility of subfields in OPAC
985
    $dbh->do(q{
966
    $dbh->do(q{
(-)a/t/db_dependent/selenium/remove_from_cart.t (-5 / +2 lines)
Lines 44-54 C4::Context->set_preference('SearchEngine', 'Zebra'); Link Here
44
44
45
my $mock_zebra = t::lib::Mocks::Zebra->new(
45
my $mock_zebra = t::lib::Mocks::Zebra->new(
46
    {
46
    {
47
        koha_conf => $ENV{KOHA_CONF},
47
        koha_conf   => $ENV{KOHA_CONF},
48
        user      => $ENV{KOHA_USER},
48
        marcflavour => $marcflavour,
49
        password  => $ENV{KOHA_PASS},
50
        intranet  => $ENV{KOHA_INTRANET_URL},
51
        opac      => $ENV{KOHA_OPAC_URL},
52
    }
49
    }
53
);
50
);
54
51
(-)a/t/db_dependent/www/search_utf8.t (-14 / +7 lines)
Lines 34-42 use t::lib::Mocks::Zebra; Link Here
34
my $testdir = File::Spec->rel2abs( dirname(__FILE__) );
34
my $testdir = File::Spec->rel2abs( dirname(__FILE__) );
35
# global variables that will be used when forking
35
# global variables that will be used when forking
36
36
37
my $koha_conf = $ENV{KOHA_CONF};
38
my $xml       = XMLin($koha_conf);
39
40
my $marcflavour = C4::Context->preference('marcflavour') || 'MARC21';
37
my $marcflavour = C4::Context->preference('marcflavour') || 'MARC21';
41
38
42
my $file1 =
39
my $file1 =
Lines 54-61 my $file3 = Link Here
54
  ? "$testdir/data/unimarcutf8supprec.mrc"
51
  ? "$testdir/data/unimarcutf8supprec.mrc"
55
  : "$testdir/data/marc21utf8supprec.mrc";
52
  : "$testdir/data/marc21utf8supprec.mrc";
56
53
57
my $user     = $ENV{KOHA_USER} || $xml->{config}->{user};
58
my $password = $ENV{KOHA_PASS} || $xml->{config}->{pass};
59
our $intranet = $ENV{KOHA_INTRANET_URL};
54
our $intranet = $ENV{KOHA_INTRANET_URL};
60
our $opac     = $ENV{KOHA_OPAC_URL};
55
our $opac     = $ENV{KOHA_OPAC_URL};
61
56
Lines 76-86 $opac =~ s#/$##; Link Here
76
71
77
my $mock_zebra = t::lib::Mocks::Zebra->new(
72
my $mock_zebra = t::lib::Mocks::Zebra->new(
78
    {
73
    {
79
        koha_conf => $koha_conf,
80
        user      => $user,
81
        password  => $password,
82
        intranet  => $intranet,
74
        intranet  => $intranet,
83
        opac      => $opac
75
        opac      => $opac,
76
        koha_conf => $ENV{KOHA_CONF},
84
    }
77
    }
85
);
78
);
86
79
Lines 99-110 if ( not defined $mock_zebra->{indexer_pid} ) { Link Here
99
our $agent = Test::WWW::Mechanize->new( autocheck => 1 );
92
our $agent = Test::WWW::Mechanize->new( autocheck => 1 );
100
$agent->get_ok( "$intranet/cgi-bin/koha/mainpage.pl", 'connect to intranet' );
93
$agent->get_ok( "$intranet/cgi-bin/koha/mainpage.pl", 'connect to intranet' );
101
$agent->form_name('loginform');
94
$agent->form_name('loginform');
102
$agent->field( 'password', $password );
95
$agent->field( 'userid', $ENV{KOHA_PASS} );
103
$agent->field( 'userid',   $user );
96
$agent->field( 'password', $ENV{KOHA_USER} );
104
$agent->field( 'branch',   '' );
97
$agent->field( 'branch',   '' );
105
$agent->click_ok( '', 'login to staff interface' );
98
$agent->click_ok( '', 'login to staff interface' );
106
99
107
my $batch_id = $mock_zebra->load_records($file1);
100
my $batch_id = $mock_zebra->load_records_ui($file1);
108
my $utf8_reg1 = qr/学協会. μμ/;
101
my $utf8_reg1 = qr/学協会. μμ/;
109
test_search('Αθήνα', 'deuteros', $utf8_reg1);
102
test_search('Αθήνα', 'deuteros', $utf8_reg1);
110
$mock_zebra->clean_records($batch_id);
103
$mock_zebra->clean_records($batch_id);
Lines 119-125 $mock_zebra->launch_indexer; Link Here
119
if ( not defined $mock_zebra->{indexer_pid} ) {
112
if ( not defined $mock_zebra->{indexer_pid} ) {
120
    plan skip_all => "Tests skip. Error starting the indexer daemon to do those tests\n";
113
    plan skip_all => "Tests skip. Error starting the indexer daemon to do those tests\n";
121
}
114
}
122
$batch_id = $mock_zebra->load_records($file2);
115
$batch_id = $mock_zebra->load_records_ui($file2);
123
my $utf8_reg2 = qr/Tòmas/;
116
my $utf8_reg2 = qr/Tòmas/;
124
test_search('Ramòn', 'Tòmas',$utf8_reg2);
117
test_search('Ramòn', 'Tòmas',$utf8_reg2);
125
$mock_zebra->clean_records($batch_id);
118
$mock_zebra->clean_records($batch_id);
Lines 134-140 $mock_zebra->launch_indexer; Link Here
134
if ( not defined $mock_zebra->{indexer_pid} ) {
127
if ( not defined $mock_zebra->{indexer_pid} ) {
135
    plan skip_all => "Tests skip. Error starting the indexer daemon to do those tests\n";
128
    plan skip_all => "Tests skip. Error starting the indexer daemon to do those tests\n";
136
}
129
}
137
$batch_id = $mock_zebra->load_records($file3);
130
$batch_id = $mock_zebra->load_records_ui($file3);
138
my $utf8_reg3 = qr/😀/;
131
my $utf8_reg3 = qr/😀/;
139
test_search("𠻺tomasito𠻺", 'A tiny record', $utf8_reg3);
132
test_search("𠻺tomasito𠻺", 'A tiny record', $utf8_reg3);
140
$mock_zebra->clean_records($batch_id);
133
$mock_zebra->clean_records($batch_id);
(-)a/t/lib/Mocks/Zebra.pm (-7 / +73 lines)
Lines 1-5 Link Here
1
package t::lib::Mocks::Zebra;
1
package t::lib::Mocks::Zebra;
2
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 3 of the License, or
8
# (at your option) any later version.
9
#
10
# Koha is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
3
use Modern::Perl;
18
use Modern::Perl;
4
use Test::More;
19
use Test::More;
5
use File::Basename qw(dirname );
20
use File::Basename qw(dirname );
Lines 8-25 use File::Path qw( rmtree ); Link Here
8
use JSON qw( decode_json );
23
use JSON qw( decode_json );
9
use C4::ImportBatch;
24
use C4::ImportBatch;
10
25
26
=head1 NAME
27
28
t::lib::Mocks::Zebra - Trying to mock zebra index
29
30
IMPORTANT NOTE: This module is not working as you may think it could work.
31
32
It will effectively create a new koha-conf.xml file in a temporary directory with zebra config files correctly.
33
So it will not affect the koha-conf used by plack (and so the UI).
34
35
If you pass koha_conf to the constructor the usual zebra db will be used, otherwise a new koha-conf.xml file will be generated
36
and the usual zebra db will not be affected. However you must pass $ENV{KOHA_CONF} if you want to test the UI.
37
38
=cut
39
40
11
sub new {
41
sub new {
12
    my ( $class, $params ) = @_;
42
    my ( $class, $params ) = @_;
13
43
14
    my $datadir = tempdir();;
44
    my $marcflavour = $params->{marcflavour} ? lc($params->{marcflavour}) : 'marc21';
45
    my $koha_conf = $params->{koha_conf};
46
47
    my $datadir = tempdir();
48
    my $zebra_db_dir;
49
    unless ( $koha_conf ) {
50
        system(dirname(__FILE__) . "/../../db_dependent/zebra_config.pl $datadir $marcflavour");
51
52
        Koha::Caches->get_instance('config')->flush_all;
53
        $koha_conf = "$datadir/etc/koha-conf.xml";
54
        my $context = C4::Context->new($koha_conf);
55
        $context->set_context();
56
        $zebra_db_dir = "$datadir/etc/koha/zebradb/";
57
    } else {
58
        $koha_conf = $ENV{KOHA_CONF};
59
        $zebra_db_dir = dirname($koha_conf);
60
    }
61
15
    my $self = {
62
    my $self = {
16
        datadir   => $datadir,
63
        datadir   => $datadir,
17
        koha_conf => $params->{koha_conf},
64
        koha_conf => $koha_conf,
18
        user      => $params->{user},
65
        zebra_db_dir => $zebra_db_dir,
19
        password  => $params->{password},
20
        intranet  => $params->{intranet},
66
        intranet  => $params->{intranet},
21
        opac      => $params->{opac}
67
        opac      => $params->{opac}
22
    };
68
    };
69
23
    return bless $self, $class;
70
    return bless $self, $class;
24
}
71
}
25
72
Lines 30-35 sub launch_zebra { Link Here
30
    my $datadir = $self->{datadir};
77
    my $datadir = $self->{datadir};
31
    my $koha_conf = $self->{koha_conf};
78
    my $koha_conf = $self->{koha_conf};
32
79
80
    unlink("$datadir/zebra.log");
33
    my $zebra_pid = fork();
81
    my $zebra_pid = fork();
34
    if ( $zebra_pid == 0 ) {
82
    if ( $zebra_pid == 0 ) {
35
        exec("zebrasrv -f $koha_conf -v none,request -l $datadir/zebra.log");
83
        exec("zebrasrv -f $koha_conf -v none,request -l $datadir/zebra.log");
Lines 55-60 sub launch_indexer { Link Here
55
}
103
}
56
104
57
sub load_records {
105
sub load_records {
106
    my ( $self, $marc_dir, $marc_format, $record_type, $init ) = @_;
107
108
    my $datadir = $self->{datadir};
109
    my $zebra_cfg = $self->{zebra_db_dir}
110
      . ( $record_type eq 'biblios'
111
        ? '/zebra-biblios-dom.cfg'
112
        : '/zebra-authorities-dom.cfg' );
113
114
    my @cmds;
115
    push @cmds, "zebraidx -c $zebra_cfg  -v none,fatal -g $marc_format -d $record_type init" if $init;
116
    push @cmds, "zebraidx -c $zebra_cfg  -v none,fatal -g $marc_format -d $record_type update $marc_dir";
117
    push @cmds, "zebraidx -c $zebra_cfg  -v none,fatal -g $marc_format -d $record_type commit";
118
119
    for my $cmd ( @cmds ) {
120
        system($cmd);
121
    }
122
}
123
124
sub load_records_ui {
58
    my ( $self, $file ) = @_;
125
    my ( $self, $file ) = @_;
59
    my $jsonresponse;
126
    my $jsonresponse;
60
    my $cgi_root = $self->{intranet} . '/cgi-bin/koha';
127
    my $cgi_root = $self->{intranet} . '/cgi-bin/koha';
Lines 62-69 sub load_records { Link Here
62
    our $agent = Test::WWW::Mechanize->new( autocheck => 1 );
129
    our $agent = Test::WWW::Mechanize->new( autocheck => 1 );
63
    $agent->get_ok( "$cgi_root/mainpage.pl", 'connect to intranet' );
130
    $agent->get_ok( "$cgi_root/mainpage.pl", 'connect to intranet' );
64
    $agent->form_name('loginform');
131
    $agent->form_name('loginform');
65
    $agent->field( 'password', $self->{password} );
132
    $agent->field( 'userid', $ENV{KOHA_PASS} );
66
    $agent->field( 'userid',   $self->{user} );
133
    $agent->field( 'password', $ENV{KOHA_USER} );
67
    $agent->field( 'branch',   '' );
134
    $agent->field( 'branch',   '' );
68
    $agent->click_ok( '', 'login to staff interface' );
135
    $agent->click_ok( '', 'login to staff interface' );
69
136
70
- 

Return to bug 29368