Bugzilla – Attachment 75323 Details for
Bug 20706
Fix links to help files for changed file structure (removed numbering on files)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20706: Add a help URL validator test
Bug-20706-Add-a-help-URL-validator-test.patch (text/plain), 8.46 KB, created by
Mark Tompsett
on 2018-05-15 03:10:18 UTC
(
hide
)
Description:
Bug 20706: Add a help URL validator test
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2018-05-15 03:10:18 UTC
Size:
8.46 KB
patch
obsolete
>From cda9145814ddf18e065cfae14d9e639f42758393 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 15 May 2018 03:00:31 +0000 >Subject: [PATCH] Bug 20706: Add a help URL validator test > >TEST PLAN >---------- >1) apply patch >2) kshell >3) prove t/db_dependent/www/help.t > -- Add tests should pass >--- > t/db_dependent/www/help.t | 260 ++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 260 insertions(+) > create mode 100644 t/db_dependent/www/help.t > >diff --git a/t/db_dependent/www/help.t b/t/db_dependent/www/help.t >new file mode 100644 >index 0000000000..423ba0e646 >--- /dev/null >+++ b/t/db_dependent/www/help.t >@@ -0,0 +1,260 @@ >+#!/usr/bin/perl >+ >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+ >+use utf8; >+use XML::Simple; >+use Encode; >+ >+use Test::More; #See plan tests => \d+ below >+use Test::WWW::Mechanize; >+ >+my $koha_conf = $ENV{KOHA_CONF}; >+my $xml = XMLin($koha_conf); >+ >+my $user = $ENV{KOHA_USER} || $xml->{config}->{user}; >+my $password = $ENV{KOHA_PASS} || $xml->{config}->{pass}; >+my $intranet = $ENV{KOHA_INTRANET_URL}; >+ >+ >+eval{ >+ use C4::Context; >+}; >+if ($@) { >+ plan skip_all => "Tests skip. You must have a working Context\n"; >+} >+elsif (not defined $intranet) { >+ plan skip_all => "Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests\n"; >+} >+ >+ >+$intranet =~ s#/$##; >+ >+my $agent = Test::WWW::Mechanize->new( autocheck => 1 ); >+ >+# Fake a help page >+my @url_parts = ( >+ "about.pl", >+ "acqui/acqui-home.pl", >+ "acqui/addorderiso2709.pl", >+ "acqui/basket.pl", >+ "acqui/basketgroup.pl", >+ "acqui/basketheader.pl", >+ "acqui/booksellers.pl", >+ "acqui/edifactmsgs.pl", >+ "acqui/histsearch.pl", >+ "acqui/invoice.pl", >+ "acqui/invoices.pl", >+ "acqui/lateorders.pl", >+ "acqui/neworderbiblio.pl", >+ "acqui/neworderempty.pl", >+ "acqui/newordersubscription.pl", >+ "acqui/newordersuggestion.pl", >+ "acqui/orderreceive.pl", >+ "acqui/parcel.pl", >+ "acqui/parcels.pl", >+ "acqui/supplier.pl", >+ "acqui/uncertainprice.pl", >+ "acqui/z3950_search.pl", >+ "admin/admin-home.pl", >+ "admin/aqbudgetperiods.pl", >+ "admin/aqbudgets.pl", >+ "admin/aqcontract.pl", >+ "admin/aqplan.pl", >+ "admin/auth_subfields_structure.pl", >+ "admin/auth_tag_structure.pl", >+ "admin/authorised_values.pl", >+ "admin/authtypes.pl", >+ "admin/biblio_framework.pl", >+ "admin/branch_transfer_limits.pl", >+ "admin/branches.pl", >+ "admin/categorie.pl", >+ "admin/checkmarc.pl", >+ "admin/cities.pl", >+ "admin/classsources.pl", >+ "admin/columns_settings.pl", >+ "admin/currency.pl", >+ "admin/didyoumean.pl", >+ "admin/edi_accounts.pl", >+ "admin/edi_ean_accounts.pl", >+ "admin/fieldmapping.pl", >+ "admin/item_circulation_alerts.pl", >+ "admin/items_search_fields.pl", >+ "admin/itemtypes.pl", >+ "admin/koha2marclinks.pl", >+ "admin/marc_subfields_structure.pl", >+ "admin/marctagstructure.pl", >+ "admin/matching-rules.pl", >+ "admin/oai_set_mappings.pl", >+ "admin/oai_sets.pl", >+ "admin/patron-attr-types.pl", >+ "admin/preferences.pl", >+ "admin/smart-rules.pl", >+ "admin/systempreferences.pl", >+ "admin/transport-cost-matrix.pl", >+ "admin/z3950servers.pl", >+ "authorities/authorities-home.pl", >+ "authorities/authorities.pl", >+ "authorities/detail.pl", >+ "authorities/merge.pl", >+ "catalogue/detail.pl", >+ "catalogue/issuehistory.pl", >+ "catalogue/itemsearch.pl", >+ "catalogue/moredetail.pl", >+ "catalogue/search-history.pl", >+ "catalogue/search.pl", >+ "cataloguing/addbiblio.pl", >+ "cataloguing/addbooks.pl", >+ "cataloguing/additem.pl", >+ "cataloguing/linkitem.pl", >+ "cataloguing/merge.pl", >+ "cataloguing/moveitem.pl", >+ "circ/branchoverdues.pl", >+ "circ/branchtransfers.pl", >+ "circ/circulation-home.pl", >+ "circ/circulation.pl", >+ "circ/offline.pl", >+ "circ/on-site_checkouts.pl", >+ "circ/overdue.pl", >+ "circ/pendingreserves.pl", >+ "circ/renew.pl", >+ "circ/reserveratios.pl", >+ "circ/returns.pl", >+ "circ/selectbranchprinter.pl", >+ "circ/transferstoreceive.pl", >+ "circ/view_holdsqueue.pl", >+ "circ/waitingreserves.pl", >+ "course_reserves/add_items.pl", >+ "course_reserves/course-details.pl", >+ "course_reserves/course-reserves.pl", >+ "course_reserves/course.pl", >+ "labels/label-edit-batch.pl", >+ "labels/label-edit-layout.pl", >+ "labels/label-edit-profile.pl", >+ "labels/label-edit-template.pl", >+ "labels/label-home.pl", >+ "labels/label-manage.pl", >+ "labels/spinelabel-home.pl", >+ "mainpage.pl", >+ "members/boraccount.pl", >+ "members/discharge.pl", >+ "members/files.pl", >+ "members/mancredit.pl", >+ "members/maninvoice.pl", >+ "members/member-flags.pl", >+ "members/member-password.pl", >+ "members/member.pl", >+ "members/memberentry.pl", >+ "members/members-home.pl", >+ "members/members-update.pl", >+ "members/moremember.pl", >+ "members/notices.pl", >+ "members/pay.pl", >+ "members/paycollect.pl", >+ "members/purchase-suggestions.pl", >+ "members/readingrec.pl", >+ "members/routing-lists.pl", >+ "members/statistics.pl", >+ "nohelp.pl", >+ "offline_circ/list.pl", >+ "offline_circ/process_koc.pl", >+ "patron_lists/lists.pl", >+ "patroncards/edit-batch.pl", >+ "patroncards/edit-layout.pl", >+ "patroncards/edit-profile.pl", >+ "patroncards/edit-template.pl", >+ "patroncards/home.pl", >+ "patroncards/image-manage.pl", >+ "patroncards/manage.pl", >+ "plugins/plugins-home.pl", >+ "plugins/plugins-upload.pl", >+ "reports/acquisitions_stats.pl", >+ "reports/bor_issues_top.pl", >+ "reports/borrowers_out.pl", >+ "reports/borrowers_stats.pl", >+ "reports/cat_issues_top.pl", >+ "reports/catalogue_out.pl", >+ "reports/catalogue_stats.pl", >+ "reports/dictionary.pl", >+ "reports/guided_reports.pl", >+ "reports/issues_avg_stats.pl", >+ "reports/issues_stats.pl", >+ "reports/itemslost.pl", >+ "reports/manager.pl", >+ "reports/reports-home.pl", >+ "reports/reserves_stats.pl", >+ "reports/serials_stats.pl", >+ "reserve/request.pl", >+ "reviews/reviewswaiting.pl", >+ "rotating_collections/rotatingCollections.pl", >+ "serials/checkexpiration.pl", >+ "serials/claims.pl", >+ "serials/routing.pl", >+ "serials/serials-collection.pl", >+ "serials/serials-edit.pl", >+ "serials/serials-home.pl", >+ "serials/subscription-add.pl", >+ "serials/subscription-detail.pl", >+ "serials/subscription-frequencies.pl", >+ "serials/subscription-numberpatterns.pl", >+ "suggestion/suggestion.pl", >+ "tags/list.pl", >+ "tags/review.pl", >+ "tools/batchMod.pl", >+ "tools/batch_delete_records.pl", >+ "tools/batch_record_modification.pl", >+ "tools/cleanborrowers.pl", >+ "tools/csv-profiles.pl", >+ "tools/export.pl", >+ "tools/holidays.pl", >+ "tools/import_borrowers.pl", >+ "tools/inventory.pl", >+ "tools/koha-news.pl", >+ "tools/letter.pl", >+ "tools/manage-marc-import.pl", >+ "tools/marc_modification_templates.pl", >+ "tools/modborrowers.pl", >+ "tools/overduerules.pl", >+ "tools/picture-upload.pl", >+ "tools/quotes-upload.pl", >+ "tools/quotes.pl", >+ "tools/scheduler.pl", >+ "tools/stage-marc-import.pl", >+ "tools/tools-home.pl", >+ "tools/upload-cover-image.pl", >+ "tools/viewlog.pl", >+ "virtualshelves/shelves.pl" >+); >+ >+foreach my $url_part (@url_parts) { >+ my $test_url = "$intranet/cgi-bin/koha/$url_part"; >+ $agent->get_ok( "$intranet/cgi-bin/koha/help.pl?url=$test_url" ); >+ my $page = $agent->content(); >+ my $current_help_url = $page; >+ if ($current_help_url =~ /full documentation(.*)/) { >+ $current_help_url = $1; >+ } >+ if ($current_help_url =~ /href="(.*?)">(.*?)manual/) { >+ $current_help_url = $1; >+ } >+ $current_help_url =~ s/17.11/18.05/g; >+ $agent->get_ok( $current_help_url ); >+ diag $current_help_url; >+} >+ >+done_testing(); >-- >2.11.0
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 20706
:
75041
|
75235
|
75322
|
75323
|
75324
|
75337
|
75342
|
75343
|
75344
|
75345
|
75346
|
75357
|
75358
|
75359
|
75360