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

(-)a/t/db_dependent/selenium/administration_tasks.t (-8 / +14 lines)
Lines 33-38 my $itemtype = 'UT_DVD'; Link Here
33
my $frameworkcode = 'UTFW';     # frameworkcode is only 4 characters max!
33
my $frameworkcode = 'UTFW';     # frameworkcode is only 4 characters max!
34
my $branchcode    = 'UT_BC';
34
my $branchcode    = 'UT_BC';
35
my $av_category   = 'AV_CAT_TEST';
35
my $av_category   = 'AV_CAT_TEST';
36
my $category_code = 'PATRON_CAT';
36
our ($cleanup_needed);
37
our ($cleanup_needed);
37
38
38
SKIP: {
39
SKIP: {
Lines 159-181 SKIP: { Link Here
159
                main => 'doc3'
160
                main => 'doc3'
160
            }
161
            }
161
        );
162
        );
162
        $s->driver->accept_alert;
163
        $s->driver->accept_alert; # Accept the modal "Are you sure you want to delete this authorized value?"
163
    };
164
    };
164
165
165
    { #Patron categories
166
    { # Patron categories
166
        $driver->get($mainpage);
167
        $driver->get($mainpage);
167
        $s->click( { href => '/admin/categories.pl', main => 'doc3' } ); #Koha administration
168
        $s->click( { href => '/admin/admin-home.pl', main => 'container-main' } ); # Koha administration
168
        $s->click( { href => '/admin/categories.pl?op=add_form', main => 'doc' } ); #New patron category
169
        $s->click( { href => '/admin/categories.pl', main => 'doc' } ); # Patron categories
170
        $s->click( { href => '/admin/categories.pl?op=add_form', main => 'doc3' } ); # New patron category
169
171
170
        $s->fill_form( { categorycode => 'Test', description => 'Test category', enrolmentperiod => 12, category_type => 'Adult' } );
172
        $s->fill_form( { categorycode => $category_code, description => 'Test category', enrolmentperiod => 12, category_type => 'A' } );
171
        $s->submit_form;
173
        $s->submit_form;
172
174
173
        $s->click(
175
        $s->click(
174
            {
176
            {
175
                href => '/admin/categories.pl?op=delete_confirm&categorycode=TEST',
177
                href => '/admin/categories.pl?op=delete_confirm&categorycode=' . $category_code,
176
                main => 'doc3'
178
                main => 'doc3'
177
            }
179
            }
178
        );
180
        ); # Delete button
181
182
        $s->submit_form; # Delete this category
183
184
        # TODO Make sure the category has been deleted
179
    };
185
    };
180
186
181
    $driver->quit();
187
    $driver->quit();
Lines 191-194 sub cleanup { Link Here
191
    $dbh->do(q|DELETE FROM biblio_framework WHERE frameworkcode=?|, undef, $frameworkcode);
197
    $dbh->do(q|DELETE FROM biblio_framework WHERE frameworkcode=?|, undef, $frameworkcode);
192
    $dbh->do(q|DELETE FROM branches WHERE branchcode=?|, undef, $branchcode);
198
    $dbh->do(q|DELETE FROM branches WHERE branchcode=?|, undef, $branchcode);
193
    $dbh->do(q|DELETE FROM authorised_value_categories WHERE category_name=?|, undef, $av_category);
199
    $dbh->do(q|DELETE FROM authorised_value_categories WHERE category_name=?|, undef, $av_category);
200
    $dbh->do(q|DELETE FROM categories WHERE categorycode=?|, undef, $category_code);
194
}
201
}
195
- 

Return to bug 19243