Add the option to disable languages managment to cover special cases
We understand languages management as the ability to add new languages or remove existing ones. When no option is passed it will allow language manipulation by default. There are 3 special places where we want block languages management: - admin legislation processes homepage - admin legislation processes milestones summary - proposals retired form Co-Authored-By: Sebastia <sebastia.roig@gmail.com>
This commit is contained in:
@@ -282,4 +282,25 @@ describe "Admin collaborative legislation" do
|
||||
expect(page).to have_content "There is still a long journey ahead of us"
|
||||
end
|
||||
end
|
||||
|
||||
context "Special interface translation behaviour" do
|
||||
let!(:process) { create(:legislation_process) }
|
||||
|
||||
before { Setting["feature.translation_interface"] = true }
|
||||
after { Setting["feature.translation_interface"] = nil }
|
||||
|
||||
scenario "Cant manage translations on homepage form" do
|
||||
visit edit_admin_legislation_process_homepage_path(process)
|
||||
|
||||
expect(page).not_to have_css "#add_language"
|
||||
expect(page).not_to have_link "Remove language"
|
||||
end
|
||||
|
||||
scenario "Cant manage translations on milestones summary form" do
|
||||
visit admin_legislation_process_milestones_path(process)
|
||||
|
||||
expect(page).not_to have_css "#add_language"
|
||||
expect(page).not_to have_link "Remove language"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user