|
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 160-182
SKIP: {
Link Here
|
| 160 |
main => 'doc3' |
161 |
main => 'doc3' |
| 161 |
} |
162 |
} |
| 162 |
); |
163 |
); |
| 163 |
$s->driver->accept_alert; |
164 |
$s->driver->accept_alert; # Accept the modal "Are you sure you want to delete this authorized value?" |
| 164 |
}; |
165 |
}; |
| 165 |
|
166 |
|
| 166 |
{ #Patron categories |
167 |
{ # Patron categories |
| 167 |
$driver->get($mainpage); |
168 |
$driver->get($mainpage); |
| 168 |
$s->click( { href => '/admin/categories.pl', main => 'doc3' } ); #Koha administration |
169 |
$s->click( { href => '/admin/admin-home.pl', main => 'container-main' } ); # Koha administration |
| 169 |
$s->click( { href => '/admin/categories.pl?op=add_form', main => 'doc' } ); #New patron category |
170 |
$s->click( { href => '/admin/categories.pl', main => 'doc' } ); # Patron categories |
|
|
171 |
$s->click( { href => '/admin/categories.pl?op=add_form', main => 'doc3' } ); # New patron category |
| 170 |
|
172 |
|
| 171 |
$s->fill_form( { categorycode => 'Test', description => 'Test category', enrolmentperiod => 12, category_type => 'Adult' } ); |
173 |
$s->fill_form( { categorycode => $category_code, description => 'Test category', enrolmentperiod => 12, category_type => 'A' } ); |
| 172 |
$s->submit_form; |
174 |
$s->submit_form; |
| 173 |
|
175 |
|
| 174 |
$s->click( |
176 |
$s->click( |
| 175 |
{ |
177 |
{ |
| 176 |
href => '/admin/categories.pl?op=delete_confirm&categorycode=TEST', |
178 |
href => '/admin/categories.pl?op=delete_confirm&categorycode=' . $category_code, |
| 177 |
main => 'doc3' |
179 |
main => 'doc3' |
| 178 |
} |
180 |
} |
| 179 |
); |
181 |
); # Delete button |
|
|
182 |
|
| 183 |
$s->submit_form; # Delete this category |
| 184 |
|
| 185 |
# TODO Make sure the category has been deleted |
| 180 |
}; |
186 |
}; |
| 181 |
|
187 |
|
| 182 |
$driver->quit(); |
188 |
$driver->quit(); |
|
Lines 192-195
sub cleanup {
Link Here
|
| 192 |
$dbh->do(q|DELETE FROM biblio_framework WHERE frameworkcode=?|, undef, $frameworkcode); |
198 |
$dbh->do(q|DELETE FROM biblio_framework WHERE frameworkcode=?|, undef, $frameworkcode); |
| 193 |
$dbh->do(q|DELETE FROM branches WHERE branchcode=?|, undef, $branchcode); |
199 |
$dbh->do(q|DELETE FROM branches WHERE branchcode=?|, undef, $branchcode); |
| 194 |
$dbh->do(q|DELETE FROM authorised_value_categories WHERE category_name=?|, undef, $av_category); |
200 |
$dbh->do(q|DELETE FROM authorised_value_categories WHERE category_name=?|, undef, $av_category); |
|
|
201 |
$dbh->do(q|DELETE FROM categories WHERE categorycode=?|, undef, $category_code); |
| 195 |
} |
202 |
} |
| 196 |
- |
|
|