Remove Processes link on help page when legislation is disabled
This commit is contained in:
committed by
taitus
parent
299ca4cee6
commit
0ccfac76ad
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user