Add link to management modal in footer

This commit is contained in:
taitus
2024-12-09 16:36:52 +01:00
parent 119c4202fe
commit df34853792
4 changed files with 29 additions and 0 deletions

View File

@@ -20,4 +20,24 @@ describe Layout::FooterComponent do
expect(page).not_to be_rendered
end
describe "link to manage cookies" do
it "shows a link to the cookies management modal when the cookies consent is enabled" do
Setting["feature.cookies_consent"] = true
render_inline Layout::FooterComponent.new
page.find(".subfooter") do |footer|
expect(footer).to have_css "a[data-open=cookies_consent_management]", text: "Manage cookies"
end
end
it "does not show a link to the cookies management modal when the cookies consent is disabled" do
Setting["feature.cookies_consent"] = false
render_inline Layout::FooterComponent.new
expect(page).not_to have_content "Manage cookies"
end
end
end