Render interface translation by default on SDGManagement

This commit is contained in:
taitus
2020-12-18 18:12:56 +01:00
parent 36d487728e
commit 9ac6511d96
2 changed files with 19 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ module TranslatableFormHelper
end end
def backend_translations_enabled? def backend_translations_enabled?
(controller.class.parents & [Admin, Management, Valuation]).any? (controller.class.parents & [Admin, Management, Valuation, SDGManagement]).any?
end end
def highlight_translation_html_class def highlight_translation_html_class

View File

@@ -97,4 +97,22 @@ describe "Local Targets", :js do
expect(page).not_to have_content("1.1.1") expect(page).not_to have_content("1.1.1")
end end
end end
describe "When translation interface feature setting" do
scenario "Is enabled translation interface should be rendered" do
Setting["feature.translation_interface"] = true
visit new_sdg_management_local_target_path
expect(page).to have_css ".globalize-languages"
end
scenario "Is disabled translation interface should be rendered" do
Setting["feature.translation_interface"] = nil
visit new_sdg_management_local_target_path
expect(page).to have_css ".globalize-languages"
end
end
end end