diff --git a/app/views/pages/help/_menu.html.erb b/app/views/pages/help/_menu.html.erb index 5391b3c82..61cb44687 100644 --- a/app/views/pages/help/_menu.html.erb +++ b/app/views/pages/help/_menu.html.erb @@ -29,11 +29,13 @@ class: "button hollow expanded" ] if feature?(:polls) ), - [ - t("pages.help.menu.processes"), - "#processes", - class: "button hollow expanded" - ], + ( + [ + t("pages.help.menu.processes"), + "#processes", + class: "button hollow expanded" + ] if feature?(:legislation) + ), [ t("pages.help.menu.other"), "#other", diff --git a/spec/system/help_page_spec.rb b/spec/system/help_page_spec.rb index 5b1a365a7..a03dcfe3a 100644 --- a/spec/system/help_page_spec.rb +++ b/spec/system/help_page_spec.rb @@ -56,4 +56,22 @@ describe "Help page" do expect(page).not_to have_link "Sustainable Development Goals help" end + + scenario "renders the legislation section link when the process is enabled" do + Setting["feature.help_page"] = true + Setting["process.legislation"] = true + + visit page_path("help") + + expect(page).to have_link "Processes", href: "#processes" + end + + scenario "does not render the legislation section link when the process is disabled" do + Setting["feature.help_page"] = true + Setting["process.legislation"] = nil + + visit page_path("help") + + expect(page).not_to have_link "Processes" + end end