From 53e7fcb0190e0e37a0e3e8e6f746837abe0a6573 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Wed, 29 Aug 2018 16:04:27 +0100 Subject: [PATCH 1/2] Imcreased cookies banner font size for med/large screens to improve readability --- .../darkswarm/cookies_banner.css.scss | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/darkswarm/cookies_banner.css.scss b/app/assets/stylesheets/darkswarm/cookies_banner.css.scss index 04d40753b6..723b41eb1f 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; + } + } } From 59f8dd445827ec5f62747b1046bafff1ecdd0610 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Sat, 1 Sep 2018 20:35:07 +0100 Subject: [PATCH 2/2] Improved cookies spec by keeping global config values as they were before the test --- spec/features/consumer/cookies_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spec/features/consumer/cookies_spec.rb b/spec/features/consumer/cookies_spec.rb index e76559f4b4..ca29699044 100644 --- a/spec/features/consumer/cookies_spec.rb +++ b/spec/features/consumer/cookies_spec.rb @@ -2,6 +2,14 @@ require 'spec_helper' 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 @@ -52,6 +60,14 @@ feature "Cookies", js: true do 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')