-
-
Notifications
You must be signed in to change notification settings - Fork 730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not show cookies banner once user accept it #10884
Do not show cookies banner once user accept it #10884
Conversation
Once the user accept the cookie, we should not show the cookie banner element. This is handled via `app/helpers/footer_links_helper.rb#cookies_policy_link` and boolean: ``` !Web::CookiesConsent.new(cookies, request.host).exists? && Spree::Config.cookies_consent_banner_toggle ```
Nice, thanks for that tip @jibees. Indeed, If we run that spec with:
Set to (I'm still wondering where was this regression introduced...) |
Thanks @filipefurtad0 |
I think I've found it @jibees. It seems we have a openfoodnetwork/spec/base_spec_helper.rb Lines 94 to 100 in 32d425d
We should probably run the whole spec with caching, right? |
Thanks! I've cherry picked your commit! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! 👍
@@ -96,7 +96,7 @@ | |||
%hr.hr-light | |||
%br | |||
|
|||
= cache_with_locale [ContentConfig.cache_key, TermsOfServiceFile.current_url, Spree::Config.privacy_policy_url] do | |||
= cache_with_locale [ContentConfig.cache_key, TermsOfServiceFile.current_url, Spree::Config.privacy_policy_url, Spree::Config.cookies_consent_banner_toggle, Web::CookiesConsent.new(cookies, request.host)] do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this PR:
I wonder if we should enable cache for spec/services/terms_of_service_spec.rb
...
Hey @jibees , Thanks for this quick fix. I've staged the PR and can confirm that, by following the steps you've pointed out:
Some regression testing:
All good, merging! 🚀 PS: signalling issue #10261, as I've bumped into it during these tests: |
Once the user accept the cookie, we should not show the cookie banner element. This is handled via
app/helpers/footer_links_helper.rb#cookies_policy_link
and boolean:As far as I know, this could not be revealed by automatic specs since we don't use cache in test env.
openfoodnetwork/spec/system/consumer/cookies_spec.rb
Lines 20 to 26 in 3cd53cb
What? Why?
Closes #10882
What should we test?
Release notes
Changelog Category: User facing changes