Add link to management modal in footer
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user