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"
|
class: "button hollow expanded"
|
||||||
] if feature?(:polls)
|
] if feature?(:polls)
|
||||||
),
|
),
|
||||||
[
|
(
|
||||||
t("pages.help.menu.processes"),
|
[
|
||||||
"#processes",
|
t("pages.help.menu.processes"),
|
||||||
class: "button hollow expanded"
|
"#processes",
|
||||||
],
|
class: "button hollow expanded"
|
||||||
|
] if feature?(:legislation)
|
||||||
|
),
|
||||||
[
|
[
|
||||||
t("pages.help.menu.other"),
|
t("pages.help.menu.other"),
|
||||||
"#other",
|
"#other",
|
||||||
|
|||||||
@@ -56,4 +56,22 @@ describe "Help page" do
|
|||||||
|
|
||||||
expect(page).not_to have_link "Sustainable Development Goals help"
|
expect(page).not_to have_link "Sustainable Development Goals help"
|
||||||
end
|
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
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user