[Koha-bugs] [Bug 27378] Enable compliance with EU Cookie Legislation via cookie consent

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 26 14:19:56 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27378

Matt Blenkinsop <matt.blenkinsop at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matt.blenkinsop at ptfs-europe
                   |                            |.com

--- Comment #121 from Matt Blenkinsop <matt.blenkinsop at ptfs-europe.com> ---

REVISED TEST PLAN
-----------------

Note: As part of this test plan you will be required to remove a value from
your browser's local storage store, we use this for storing a browser's cookie
consent choice. To remove this value when instructed to do so, do the
following:

Chrome / Edge
------
- Press F12 or right click and choose “Inspect”
- Click the "Application" tab
- On the left, expand the "Local Storage" section
- Find the entry that corresponds with the URL of your Koha and click on it
- Find the entry in the list with a "Key" of "cookieConsent"
- Click on it and press "Delete" on your keyboard

Firefox
-------
- Press F12
- Click the "Storage" tab
- On the left, expand the "Local Storage" section
- Find the entry that corresponds with the URL of your Koha and click on it
- Find the entry in the list with a "Key" of "cookieConsent"
- Click on it and press "Delete" on your keyboard

Note: Also you will be required to inspect cookies set in your browser. When
instructed to do so, do the following:

Chrome / Edge
------
- Press F12 or right click and choose “Inspect”
- Click the "Application" tab
- On the left, expand the "Cookies" section
- Find the entry that corresponds with the URL of your Koha and click on it
- View the list of cookies

Firefox
-------
- Press F12
- Click the "Storage" tab
- On the left, expand the "Cookies" section
- Find the entry that corresponds with the URL of your Koha and click on it
- View the list of cookies


1. Ensure you have a tab open on the intranet view and one open on the OPAC
view, ensure you are logged in on both
2. Search for “cookieconsent" in the sysprefs
=> TEST: Observe there are 2 new sysprefs:
  - “CookieConsentedJS"
  - "CookieConsent"
3. Change the value for the "CookieConsent" syspref to "Require" and save
4. Refresh the intranet page
=> TEST: In the intranet view, observe that a cookie consent bar appears at the
bottom of the page with just a single "Accept all cookies" button
5. Refresh the OPAC page
=> TEST: In the OPAC view, observe that a cookie consent bar appears at the
bottom of the page with just a single "Accept all cookies" button
6. Navigate to Tools > HTML customisations
7. Click New entry
8. In Display location, select CookieConsentBar
9. Set the Publication Date for today’s date
10. Add some text to the text editor and click save
11. Refresh the intranet page
=> TEST: In the intranet view, observe that the cookie consent bar appears at
the bottom of the page containing the text you specified
12. Refresh the OPAC page
=> TEST: In the OPAC view, observe that the cookie consent bar appears at the
bottom of the page containing the text you specified
13. In the HTML customisations, repeat steps 7-10 but this time selecting
CookieConsentPopup
14. Return to system preferences and search for “cookieconsent” again
15. Click the “CookieConsentedJS" syspref input
16. Click the "Add new code" link
17. Enter a name and description, and check both checkboxes.
    - For "String used to identify cookie name", enter "test1", this enables us
to delete the cookie when consent is withdrawn.
    - For "Cookie domain" enter the domain of your Koha.
    - For "Cookie path" enter "/"
18. Click the "Click to expand" link
19. Enter the following Javascript:
    (function() { 
        console.log('Hello from test1'); 
        document.cookie = “test1=testing; domain=localhost; path=/;
SameSite=None; Secure”; 
     })();
N.B. IF YOUR DOMAIN IS NOT LOCALHOST, YOU WILL NEED TO CHANGE THIS TO YOUR
CORRECT DOMAIN
20. Repeat steps 11 to 14 twice more, substituting "test1" for "test2" &
"test3"
21. Click "Save"
22. Refresh the intranet page
=> TEST: In the intranet view, observe that the cookie consent bar appears at
the bottom of the page containing 3 buttons
23. Refresh the OPAC page
=> TEST: In the OPAC view, observe that the cookie consent bar appears at the
bottom of the page containing 3 buttons
24. Click the "More information" button
=> TEST: Observe that a cookie consent popup is displayed listing the codes you
added in the syspref, displaying the name,description and checkbox for each,
allowing a code to be selected
25. Select a code
=> TEST: Observe that "Accept selected non-essential cookies" is enabled
26. Deselect all codes
=> TEST: Observe that "Accept selected non-essential cookies" is disabled
27. Open the developer tools for your browser (usually F12) and ensure you are
viewing the Javascript console
28. Click accept all cookies
=> TEST: In the Javascript console, observe that the messages in all the codes
you added to the CookieConsentedJS syspref are displayed
=> TEST: In the cookie list (as detailed at the top of the test plan) observe
that the cookies corresponding with the consents granted have been set.
29. Navigate to any other pages in the OPAC
=> TEST: On each page load, in the Javascript console, observe that the
messages in all the codes you added to the ConsentJS syspref are displayed
30. Remove the cookieConsent local storage (as detailed at the start)
31. Switch to the intranet view
32. Repeat steps 19-25 in the intranet view
33. Refresh the page
34. Click the "Accept all cookies" button on the cookie bar
=> TEST: In the Javascript console, observe that the messages in all the codes
you added to the CookieConsentedJS syspref are displayed
35. Remove the cookieConsent local storage (as detailed at the start)
36. Refresh the page
37. Click the "Accept only essential cookies" button on the cookie bar
=> TEST: In the Javascript console, observe that none of the messages in the
codes you added to the CookieConsentedJS syspref are displayed
38. Remove the cookieConsent local storage (as detailed at the start)
39. Refresh the page
40. Click the "More information" button on the cookie bar
41. Select two of the codes you defined in the CookieConsentedJS syspref
42. Click the "Accept selected non-essential cookies" button
=> TEST: In the Javascript console, observe that only the messages from the
selected codes you added to the CookieConsentedJS syspref are displayed
43. Repeat steps 28-37 on the OPAC view
44. In the OPAC view, go to the "Your account" page
=> TEST: Observe that the "your consents" option is available
45. Click on "your consents"
=> TEST: Observe that a "Cookie consents" section is displayed, with a button
46. Click the "View your cookie consents" button
=> TEST: Observe that the "Cookie consent" popup is displayed allowing you to
modify your cookie consents
47. Remove consent from at least one cookie, click “Accept selected
non-essential cookies”
=> TEST: In the cookie list in your browser (as detailed at the top of the test
plan), observe that any cookies you removed consent from have either been
removed or have no value.
48. Log out of the OPAC
=> Observe that a "Your cookies" button is displayed in the top bar next to
"Links"
49. Click the "Your cookies" button
=> TEST: Observe that the "Cookie consent" popup is displayed allowing you to
modify your cookie consents and that the consents match the same ones you had
when logged in

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list