Bug 19243: Amended Selenium test to add the creation of patron category and authorised values

Sponsored-By: Catalyst IT

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Alex Buckley 2017-12-14 23:07:30 +00:00 committed by Jonathan Druart
parent bee0c0b4ab
commit 8876fd3e71

View file

@ -32,6 +32,7 @@ my $login = $ENV{KOHA_USER} || 'koha';
my $itemtype = 'UT_DVD';
my $frameworkcode = 'UTFW'; # frameworkcode is only 4 characters max!
my $branchcode = 'UT_BC';
my $categoryname = 'Test';
our ($cleanup_needed);
SKIP: {
@ -46,7 +47,6 @@ SKIP: {
$driver->get($mainpage);
like( $driver->get_title(), qr(Log in to Koha), );
$s->auth;
{ # Item types
# Navigate to the Administration area and create an item type
$s->click( { href => '/admin/admin-home.pl', main => 'doc3' } )
@ -126,6 +126,40 @@ SKIP: {
); # Delete
};
{ #Authorized values
$driver->get($mainpage);
$s->click( { href => '/admin/admin-home.pl', main => 'doc3' } ); #Koha administration
$s->click( { href => '/admin/authorised_values.pl', main => 'doc' } ); #Authorized values
$s->click( { href => '/cgi-bin/koha/admin/authorised_values.pl?op=add_form&category=Adult', main => 'doc3' } ); # New category
$s->fill_form( { authorised_value => 'Hardover', lib => 'Hardcover book'} );
$s->submit_form;
$s->click(
{
href => '/cgi-bin/koha/admin/authorised_values.pl?op=delete&searchfield=Adult&id=400',
main => 'doc3'
}
);
};
{ #Patron categories
$driver->get($mainpage);
$s->click( { href => '/cgi-bin/koha/admin/categories.pl', main => 'doc3' } ); #Koha administration
$s->click( { href => '/cgi-bin/koha/admin/categories.pl?op=add_form', main => 'doc' } ); #New patron category
$s->fill_form( { categorycode => 'Test', description => 'Test category', enrolmentperiod => 12, category_type => 'Adult' } );
$s->submit_form;
$s->click(
{
href => '/cgi-bin/koha/admin/categories.pl?op=delete_confirm&categorycode=TEST',
main => 'doc3'
}
);
};
$driver->quit();
}