Bugzilla – Attachment 57105 Details for
Bug 17540
auth_values_input_www.t is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 17540: (Bug 7216 followup) Fix tests for auth_values_input_www.t
SIGNED-OFF-Bug-17540-Bug-7216-followup-Fix-tests-f.patch (text/plain), 4.67 KB, created by
Josef Moravec
on 2016-11-02 15:00:28 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17540: (Bug 7216 followup) Fix tests for auth_values_input_www.t
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2016-11-02 15:00:28 UTC
Size:
4.67 KB
patch
obsolete
>From d99a749658c48fe6888d24ea7b5ec9540bf95b8b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 2 Nov 2016 11:54:12 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 17540: (Bug 7216 followup) Fix tests for > auth_values_input_www.t > >This is caused by bug 17216 which modified the structure of the AV admin >page > >Test plan: > prove t/db_dependent/www/auth_values_input_www.t >should return green > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > t/db_dependent/www/auth_values_input_www.t | 39 +++++++++++++++++++++--------- > 1 file changed, 28 insertions(+), 11 deletions(-) > >diff --git a/t/db_dependent/www/auth_values_input_www.t b/t/db_dependent/www/auth_values_input_www.t >index bcb441d..265865c 100644 >--- a/t/db_dependent/www/auth_values_input_www.t >+++ b/t/db_dependent/www/auth_values_input_www.t >@@ -18,7 +18,7 @@ > use Modern::Perl; > > use utf8; >-use Test::More tests => 28; >+use Test::More tests => 33; > use Test::WWW::Mechanize; > use XML::Simple; > use JSON; >@@ -71,18 +71,32 @@ $agent->get_ok( "$intranet/cgi-bin/koha/mainpage.pl", 'load main page' ); > > $category = 'å¦åä¼Î¼Î¼'; > $dbh->do(q|DELETE FROM authorised_values WHERE category = ?|, undef, $category); >+$dbh->do(q|DELETE FROM authorised_value_categories WHERE category_name = ?|, undef, $category); > >+$expected_base = q|authorised_values.pl|; > $agent->get_ok( "$intranet/cgi-bin/koha/admin/authorised_values.pl", 'Connect to Authorized values page' ); > $agent->get_ok( "$intranet/cgi-bin/koha/admin/authorised_values.pl?op=add_form", 'Open to create a new category' ); > $agent->form_name('Aform'); >+$agent->field('category', $category); >+$agent->click_ok( '', "Create new AV category " ); >+ >+$agent->base_like(qr|$expected_base|, "check base"); >+$add_form_link_exists = 0; >+for my $link ( $agent->links() ) { >+ if ( $link->url =~ m|authorised_values.pl\?op=add_form&category=$category| ) { >+ $add_form_link_exists = 1; >+ } >+} >+is( $add_form_link_exists, 1, 'Add a new category button should be displayed'); >+$agent->get_ok( "$intranet/cgi-bin/koha/admin/authorised_values.pl?op=add_form&category=$category", 'Open to create a new AV for this category' ); >+ >+$agent->form_name('Aform'); > $agent->field('authorised_value', 'εÏιμεq'); > $agent->field('lib_opac', 'autdesc2'); > $agent->field('lib', 'desc1'); >-$agent->field('category', $category); > $agent->field('branches', ''); >-$agent->click_ok( '', "Create new auth category and value" ); >+$agent->click_ok( '', "Create a new value for the category" ); > >-$expected_base = q|authorised_values.pl|; > $agent->base_like(qr|$expected_base|, "check base"); > $add_form_link_exists = 0; > $delete_form_link_exists = 0; >@@ -93,8 +107,8 @@ for my $link ( $agent->links() ) { > $delete_form_link_exists = 1; > } > } >-is( $add_form_link_exists, 1, ); >-is( $delete_form_link_exists, 1, ); >+is( $add_form_link_exists, 1, 'Add a new category button should be displayed'); >+is( $delete_form_link_exists, 1, ''); > > $agent->get_ok( "$intranet/cgi-bin/koha/admin/authorised_values.pl", 'Return to Authorized values page' ); > $agent->get_ok( "$intranet/cgi-bin/koha/admin/authorised_values.pl?searchfield=å¦åä¼Î¼Î¼&offset=0", 'Search the values inserted' ); >@@ -122,20 +136,23 @@ if ($id_to_del) { > > $category = 'tòmas'; > $dbh->do(q|DELETE FROM authorised_values WHERE category = ?|, undef, $category); >+$dbh->do(q|DELETE FROM authorised_value_categories WHERE category_name = ?|, undef, $category); > > $agent->get_ok( "$intranet/cgi-bin/koha/admin/authorised_values.pl", 'Connect to Authorized values page' ); > $agent->get_ok( "$intranet/cgi-bin/koha/admin/authorised_values.pl?op=add_form", 'Open to create a new category' ); > $agent->form_name('Aform'); >+$agent->field('category', $category); >+$agent->click_ok( '', "Create new AV category" ); >+ >+$agent->get_ok( "$intranet/cgi-bin/koha/admin/authorised_values.pl?op=add_form&category=$category", 'Open to create a new AV for this category' ); >+$agent->form_name('Aform'); > $agent->field('authorised_value', 'rà men'); > $agent->field('lib_opac', 'autdesc2'); > $agent->field('lib', 'desc1'); >-$agent->field('category', $category); > $agent->field('branches', ''); >-$agent->click_ok( '', "Create new auth category and value" ); >-$agent->get_ok( "$intranet/cgi-bin/koha/admin/authorised_values.pl?searchfield=tòmas&offset=0", 'Search the values inserted' ); >+$agent->click_ok( '', "Create a new value for the category" ); > >-$expected_base = q|authorised_values.pl\?searchfield=| . uri_escape_utf8( $category ); >-#$expected_base = q|authorised_values.pl\?searchfield=| . $category; >+$expected_base = q|authorised_values.pl|; > $agent->base_like(qr|$expected_base|, "check base"); > $add_form_link_exists = 0; > $delete_form_link_exists = 0; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17540
:
57078
|
57105
|
57138