Bug 16174

Summary: Problems in icondirectories.t and tt_valid.t due to bug 15527
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: Test SuiteAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: brendan, jonathan.druart, julian.maurice, m.de.rooy, mtompset
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 15527    
Bug Blocks:    
Attachments: Bug 16174: Warning in tt_valid.t due to bug 15527
Bug 16174: icondirectories.t broken due to bug 15527
Bug 16174: Warning in tt_valid.t due to bug 15527
Bug 16174: icondirectories.t broken due to bug 15527
Bug 16174: (QA followup) Fix remaining tests
Bug 16174: (QA followup) Fix remaining tests
Bug 16174: Warning in tt_valid.t due to bug 15527
Bug 16174: icondirectories.t broken due to bug 15527
Bug 16174: (QA followup) Fix remaining tests

Description Tomás Cohen Arazi (tcohen) 2016-03-30 18:14:28 UTC
To reproduce:
- Run
  $ prove xt/tt_valid.t
=> FAIL: You get the following warning:
Can't stat koha-tmpl/opac-tmpl/xslt/en: No such file or directory
 at xt/tt_valid.t line 8
Comment 1 Tomás Cohen Arazi (tcohen) 2016-03-30 18:18:36 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi (tcohen) 2016-03-30 19:13:51 UTC Comment hidden (obsolete)
Comment 3 Mark Tompsett 2016-03-30 23:07:17 UTC Comment hidden (obsolete)
Comment 4 Mark Tompsett 2016-03-30 23:07:21 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2016-03-31 08:52:45 UTC
There are some more:
git grep readdir|grep lib|grep js|grep -v xslt
xt/author/icondirectories.t:my @staff_themes = grep { not /^\.|lib|js/ } readdir($dh);
xt/author/translatable-templates.t:my @opac_themes = grep { not /^\.|lib|js/ } readdir($dh);
xt/author/translatable-templates.t:my @staff_themes = grep { not /^\.|lib|js/ } readdir($dh);
xt/author/valid-templates.t:for my $theme ( grep { not /^\.|lib|js/ } readdir($dh) ) {
xt/author/valid-templates.t:for my $theme ( grep { not /^\.|lib|js/ } readdir($dh) ) {
xt/single_quotes.t:for my $theme ( grep { not /^\.|lib|js/ } readdir($dh) ) {
xt/single_quotes.t:for my $theme ( grep { not /^\.|lib|js/ } readdir($dh) ) {
xt/tt_valid.t:for my $theme ( grep { not /^\.|lib|js/ } readdir($dh) ) {

Not the ones for the staff interface.
Comment 6 Tomás Cohen Arazi (tcohen) 2016-03-31 14:23:18 UTC Comment hidden (obsolete)
Comment 7 Mark Tompsett 2016-04-01 00:45:18 UTC Comment hidden (obsolete)
Comment 8 Marcel de Rooy 2016-04-01 08:47:19 UTC
Created attachment 49777 [details] [review]
Bug 16174: Warning in tt_valid.t due to bug 15527

Bug 15527 introduced a new directory (xslt) on the top level OPAC templates
directory. The tt_valid.t script should include that top level dir on the list
of excluded dirs so it doesn't look for themes there.

To test:
- Run
  $ prove xt/tt_valid.t
=> FAIL: You get the following warning:
Can't stat koha-tmpl/opac-tmpl/xslt/en: No such file or directory
 at xt/tt_valid.t line 8
- Apply the patch
- Run
  $ prove xt/tt_valid.t
=> SUCCESS: Tests pass and don't raise warnings.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Marcel de Rooy 2016-04-01 08:47:23 UTC
Created attachment 49778 [details] [review]
Bug 16174: icondirectories.t broken due to bug 15527

This patch fixes it.

To test:
- Run
  $ prove xt/author/icondirectories.t
=> FAIL: Tests fail:
   Failed test 'opac_icon_directory: koha-tmpl/opac-tmpl/xslt/itemtypeimg exists'
- Apply the patch
- Run
  $ prove xt/author/icondirectories.t
=> SUCCESS: Tests pass and don't raise warnings.
- Sign off

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Marcel de Rooy 2016-04-01 08:47:27 UTC
Created attachment 49779 [details] [review]
Bug 16174: (QA followup) Fix remaining tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Brendan Gallagher 2016-04-01 19:12:16 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!
Comment 12 Julian Maurice 2016-04-07 08:04:26 UTC
Not needed in stable versions, status changed to RESOLVED