forked from consuldemocracy/consuldemocracy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include the cookies consent components in custom views
- Loading branch information
Showing
4 changed files
with
46 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require "rails_helper" | ||
|
||
describe Layout::FooterComponent do | ||
describe "when the cookies consent feature is enabled" do | ||
before { Setting["feature.cookies_consent"] = true } | ||
|
||
it "shows a link to the cookies setup modal when the cookies setup page is enabled" do | ||
Setting["cookies_consent.setup_page"] = true | ||
|
||
render_inline Layout::FooterComponent.new | ||
|
||
page.find("footer") do |footer| | ||
expect(footer).to have_css "a[data-open=cookies_consent_setup]", text: "Cookies setup" | ||
end | ||
end | ||
|
||
it "does not show a link to the cookies setup modal when the cookies setup page is disabled" do | ||
Setting["cookies_consent.setup_page"] = false | ||
|
||
render_inline Layout::FooterComponent.new | ||
|
||
page.find("footer") do |footer| | ||
expect(footer).not_to have_css "a[data-open=cookies_consent_setup]", text: "Cookies setup" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters