Merge pull request #4291 from consul/sdg_translation_interface

Enable SDG translation interface by default
This commit is contained in:
Javi Martín
2020-12-21 18:02:41 +01:00
committed by GitHub
2 changed files with 19 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ module TranslatableFormHelper
end
def backend_translations_enabled?
(controller.class.parents & [Admin, Management, Valuation]).any?
(controller.class.parents & [Admin, Management, Valuation, SDGManagement]).any?
end
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")
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