From b11f109246a076a42b14e12c328881f8e65c75bf Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Thu, 14 Dec 2017 23:07:30 +0000 Subject: [PATCH] Bug 19243 - Amended Selenium test to add the creation of patron category and authorised values Sponsored-By: Catalyst IT --- t/db_dependent/selenium/administration_tasks.t | 36 +++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/selenium/administration_tasks.t b/t/db_dependent/selenium/administration_tasks.t index 716ce53..14feb25 100644 --- a/t/db_dependent/selenium/administration_tasks.t +++ b/t/db_dependent/selenium/administration_tasks.t @@ -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(); } -- 2.1.4