Note that in order to avoid display duplicated vertical scroll when render a modal, we are add an `overflow: unset` rule. This rule overwrite a vendor rule both in the modal we are adding and in the modal we already have when creating a budget in admin section.
22 lines
686 B
Ruby
22 lines
686 B
Ruby
require "rails_helper"
|
|
|
|
describe Layout::CookiesConsent::ManagementComponent do
|
|
before { Setting["feature.cookies_consent"] = true }
|
|
|
|
it "is not rendered when the cookies consent feature is disabled" do
|
|
Setting["feature.cookies_consent"] = false
|
|
|
|
render_inline Layout::CookiesConsent::ManagementComponent.new
|
|
|
|
expect(page).not_to be_rendered
|
|
end
|
|
|
|
it "is rendered with essential cookies content when the cookies consent is enabled" do
|
|
render_inline Layout::CookiesConsent::ManagementComponent.new
|
|
|
|
expect(page).to be_rendered
|
|
expect(page).to have_css "h2", text: "Cookies management"
|
|
expect(page).to have_css "h3", text: "Essential cookies"
|
|
end
|
|
end
|