diff --git a/app/assets/stylesheets/darkswarm/cookies_banner.css.scss b/app/assets/stylesheets/darkswarm/cookies_banner.css.scss index 04d40753b67..723b41eb1fa 100644 --- a/app/assets/stylesheets/darkswarm/cookies_banner.css.scss +++ b/app/assets/stylesheets/darkswarm/cookies_banner.css.scss @@ -4,21 +4,9 @@ background: $dark-grey; bottom: 0; position: fixed; - top: 20vh !important; + top: 15% !important; z-index: 100000; - @media only screen and (min-width: 640px) { - top: 20vh !important; - } - - @media only screen and (min-width: 800px) and (min-height: 400px) { - top: 40vh !important; - } - - @media only screen and (min-width: 1024px) and (min-height: 500px) { - top: 60vh !important; - } - button { background-color: $clr-turquoise; } @@ -27,4 +15,20 @@ color: $white; font-size: .75rem; } + + @media only screen and (min-width: 800px) and (min-height: 560px) { + top: 40% !important; + + p { + font-size: 1rem; + } + } + + @media only screen and (min-width: 1024px) and (min-height: 660px) { + top: 60% !important; + + p { + font-size: 1rem; + } + } } diff --git a/spec/features/consumer/cookies_spec.rb b/spec/features/consumer/cookies_spec.rb index 6d774769a5a..c2dbe5a078c 100644 --- a/spec/features/consumer/cookies_spec.rb +++ b/spec/features/consumer/cookies_spec.rb @@ -2,6 +2,14 @@ feature "Cookies", js: true do describe "banner" do + + # keeps banner toggle config unchanged + around do |example| + original_banner_toggle = Spree::Config[:cookies_consent_banner_toggle] + example.run + Spree::Config[:cookies_consent_banner_toggle] = original_banner_toggle + end + describe "in the homepage" do before do Spree::Config[:cookies_consent_banner_toggle] = true @@ -59,6 +67,14 @@ end describe "policy page" do + + # keeps config unchanged + around do |example| + original_config_value = Spree::Config[:cookies_policy_matomo_section] + example.run + Spree::Config[:cookies_policy_matomo_section] = original_config_value + end + scenario "showing session_id cookies description with correct instance domain" do visit '/#/policies/cookies' expect(page).to have_content('_session_id')