Patch #31941

ThemesTest may fail if a third-party theme with a favicon is installed

Added by Go MAEDA 3 months ago. Updated 3 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Code cleanup/refactoring
Target version:4.1.0

Description

Steps to reproduce:

1. Add a theme with the name 'xyz'.

cp -r public/themes/alternate public/themes/xyz
mkdir public/themes/xyz/favicon
cp public/favicon.ico public/themes/xyz/favicon/

2. Run the test.

$ bin/rails test test/integration/lib/redmine/themes_test.rb
Run options: --seed 6694

# Running:

.F

Failure:
ThemesTest#test_use_only_one_theme_favicon_if_theme_provides_many [/Users/maeda/redmines/redmine-trunk/test/integration/lib/redmine/themes_test.rb:85]:
Expected at least 1 element matching "link[rel="shortcut icon"][href^="/themes/xyz-theme/favicon/b.ico"]", found 0..
Expected 0 to be >= 1.

bin/rails test test/integration/lib/redmine/themes_test.rb:79

.F

Failure:
ThemesTest#test_use_default_favicon_if_theme_provides_none [/Users/maeda/redmines/redmine-trunk/test/integration/lib/redmine/themes_test.rb:65]:
Expected at least 1 element matching "link[rel="shortcut icon"][href^="/favicon.ico"]", found 0..
Expected 0 to be >= 1.

bin/rails test test/integration/lib/redmine/themes_test.rb:61

F

Failure:
ThemesTest#test_use_theme_favicon_if_theme_provides_one [/Users/maeda/redmines/redmine-trunk/test/integration/lib/redmine/themes_test.rb:74]:
Expected at least 1 element matching "link[rel="shortcut icon"][href^="/themes/xyz-theme/favicon/a.ico"]", found 0..
Expected 0 to be >= 1.

bin/rails test test/integration/lib/redmine/themes_test.rb:68

F

Failure:
ThemesTest#test_with_sub_uri [/Users/maeda/redmines/redmine-trunk/test/integration/lib/redmine/themes_test.rb:100]:
Expected at least 1 element matching "link[rel="shortcut icon"][href^="/foo/themes/xyz-theme/favicon/a.ico"]", found 0..
Expected 0 to be >= 1.

bin/rails test test/integration/lib/redmine/themes_test.rb:91

.

Finished in 2.641204s, 2.6503 runs/s, 6.4365 assertions/s.
7 runs, 17 assertions, 4 failures, 0 errors, 0 skips

themes_test_fix.patch Magnifier (476 Bytes) Go MAEDA, 2019-08-23 09:56

0001-ThemesTest-fails-if-a-third-party-theme-with-a-favic.patch Magnifier (1.63 KB) Go MAEDA, 2019-08-25 04:27


Related issues

Related to Redmine - Defect #25118: ThemesTest#test_without_theme_js may fail if third-party ... Closed

Associated revisions

Revision 18395
Added by Go MAEDA 3 months ago

ThemesTest may fail if a third-party theme with a favicon is installed (#31941).

Patch by Go MAEDA.

History

#1 Updated by Go MAEDA 3 months ago

Here is a patch to fix this issue.

#2 Updated by Go MAEDA 3 months ago

  • Related to Defect #25118: ThemesTest#test_without_theme_js may fail if third-party theme is installed added

#3 Updated by Go MAEDA 3 months ago

Removed a hard-coded theme name from the previous patch.

#4 Updated by Go MAEDA 3 months ago

  • Subject changed from ThemesTest may fail if a third-party theme is installed to ThemesTest may fail if a third-party theme with a favicon is installed
  • Target version changed from Candidate for next major release to 4.1.0

Setting the target version to 4.1.0.

#5 Updated by Go MAEDA 3 months ago

  • Tracker changed from Defect to Patch
  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed.

Also available in: Atom PDF