Bugzilla – Attachment 28287 Details for
Bug 12271
valid-templates.t does not test bootstrap opac templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12271 - valid-templates.t does not test bootstrap opac templates
Bug-12271---valid-templatest-does-not-test-bootstr.patch (text/plain), 2.47 KB, created by
Fridolin Somers
on 2014-05-16 09:31:58 UTC
(
hide
)
Description:
Bug 12271 - valid-templates.t does not test bootstrap opac templates
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2014-05-16 09:31:58 UTC
Size:
2.47 KB
patch
obsolete
>From fd7ae4319ae32e2165980e9a2b94724b7210a140 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Fri, 16 May 2014 11:25:19 +0200 >Subject: [PATCH] Bug 12271 - valid-templates.t does not test bootstrap opac > templates > >valid-templates.t actually tests the templates and includes of only the "prog" theme at opac and intranet. >It does not test the opac templates and includes of bootstrap theme, nor ccsr. >This is critical since this test is used for patch integrations in release maintenance. > >This patch adds the test of bootstrap opac theme. >I did not manage to add the ccsr theme since it is not a real theme, meaning it has no templates and not all includes. > >Test by runnning perl xt/author/valid-templates.t and looking at the logs. >The should be 902 test lignes. >--- > xt/author/valid-templates.t | 35 +++++++++++++++++++++++++++++------ > 1 file changed, 29 insertions(+), 6 deletions(-) > >diff --git a/xt/author/valid-templates.t b/xt/author/valid-templates.t >index 202ef57..c3d0490 100644 >--- a/xt/author/valid-templates.t >+++ b/xt/author/valid-templates.t >@@ -38,15 +38,38 @@ use Test::More; > # use FindBin; > # use IPC::Open3; > >-foreach my $type qw(intranet opac) { >- my $template_dir = File::Spec->rel2abs("koha-tmpl/$type-tmpl/prog/en/modules"); >- my $include_dir = File::Spec->rel2abs("koha-tmpl/$type-tmpl/prog/en/includes"); >- my $template_test = create_template_test($include_dir); >- find({ wanted => $template_test, no_chdir => 1 }, $template_dir, $include_dir); >-} >+print "Testing intranet prog templates\n"; >+run_template_test( >+ 'koha-tmpl/intranet-tmpl/prog/en/modules', >+ 'koha-tmpl/intranet-tmpl/prog/en/includes' >+); >+ >+print "Testing opac bootstrap templates\n"; >+run_template_test( >+ 'koha-tmpl/opac-tmpl/bootstrap/en/modules', >+ 'koha-tmpl/opac-tmpl/bootstrap/en/includes' >+); >+ >+print "Testing opac prog templates\n"; >+run_template_test( >+ 'koha-tmpl/opac-tmpl/prog/en/modules', >+ 'koha-tmpl/opac-tmpl/prog/en/includes' >+); >+ >+# TODO add test of opac ccsr templates > > done_testing(); > >+sub run_template_test { >+ my $template_path = shift; >+ my $include_path = shift; >+ my $template_dir = File::Spec->rel2abs($template_path); >+ my $include_dir = File::Spec->rel2abs($include_path); >+ my $template_test = create_template_test($include_dir); >+ find( { wanted => $template_test, no_chdir => 1 }, >+ $template_dir, $include_dir ); >+} >+ > sub create_template_test { > my $includes = shift; > return sub { >-- >1.9.1
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 12271
:
28287
|
28298