From e70fb0ae7455cbb7d5814555e1c03b27122a8388 Mon Sep 17 00:00:00 2001 From: The Minh Luong Date: Fri, 22 Apr 2022 10:28:00 -0400 Subject: [PATCH] Bug 12446: Fixing QA tool's tests This patch fixes tests that fails by the QA test tool. I removed the debug variable, since it is not used. I also got a few spelling check errors when I ran the QA test tool. I corrected them too. To test: 1) Create an Adult AND Child category in Administration/Patron categories 2) Create a child AND adult patron. 3) Go in your child patron's page. 4) Click on "Edit". 5) Notice that you can add a guarantor with "Add guarantor" button. 6) Go in your adult patron's page. 7) Click on "Edit". 8) Notice that there is no "Add guarantor" button. Therefore, you can't add a guarantor for this patron. 9) Apply patch and run updatedatabase.pl 10) Go in Administration/Patron categories and edit one of them. 12) Notice that you can see the new "Can be guarantee" field. 13) Set "Yes" on the "Can be guarantee" field for your Child AND Adult category. 14) Repeat steps 6 to 7. 15) Notice that your adult patron can now add guarantors with the "Add guarantor" button. 16) prove t/db_dependent/Patrons.t => All tests should still pass 17) Run the QA test tool. All tests should say OK Signed-off-by: Owen Leonard --- members/memberentry.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index 54e7a5d8d6..437bafb92e 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -819,7 +819,6 @@ if (C4::Context->preference('EnhancedMessagingPreferences')) { $template->param( borrower_data => \%data ); $template->param( "show_guarantor" => $categorycode ? Koha::Patron::Categories->find($categorycode)->canbeguarantee : 1); # associate with step to know where you are -my $debug and warn "memberentry step: $step"; $template->param( "step_$step" => 1) if $step; # associate with step to know where u are $template->param( step => $step ) if $step; # associate with step to know where u are @@ -827,7 +826,7 @@ $template->param( BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript category_type => $category_type,#to know the category type of the borrower "$category_type" => 1,# associate with step to know where u are - destination => $destination,#to know wher u come from and wher u must go in redirect + destination => $destination,#to know where u come from and where u must go in redirect check_member => $check_member,#to know if the borrower already exist(=>1) or not (=>0) "op$op" => 1); -- 2.20.1