Skip to content

Commit 0ab4d90

Browse files
author
Andrea Barbasso
committed
[CST-15593] fix orejime cookie name, a11y issues and package-lock
1 parent 9eaaab5 commit 0ab4d90

7 files changed

Lines changed: 25 additions & 8 deletions

File tree

cypress/support/e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ before(() => {
5454

5555
// Runs once before the first test in each "block"
5656
beforeEach(() => {
57-
// Pre-agree to all Orejime cookies by setting the orejime-anonymous cookie
57+
// Pre-agree to all Orejime cookies by setting the orejime cookie
5858
// This just ensures it doesn't get in the way of matching other objects in the page.
59-
cy.setCookie('orejime-anonymous', '{%22authentication%22:true%2C%22preferences%22:true%2C%22acknowledgement%22:true%2C%22google-analytics%22:true%2C%22google-recaptcha%22:true}');
59+
cy.setCookie('orejime', '{%22authentication%22:true%2C%22preferences%22:true%2C%22acknowledgement%22:true%2C%22google-analytics%22:true%2C%22google-recaptcha%22:true}');
6060

6161
// Remove any CSRF cookies saved from prior tests
6262
cy.clearCookie(DSPACE_XSRF_COOKIE);

package-lock.json

Lines changed: 18 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/core/google-recaptcha/google-recaptcha.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export class GoogleRecaptchaService {
105105
tap(([recaptchaVersionRD, recaptchaModeRD, recaptchaKeyRD]) => {
106106

107107
if (
108-
this.cookieService.get('orejime-anonymous') && this.cookieService.get('orejime-anonymous')[CAPTCHA_NAME] &&
108+
this.cookieService.get('orejime') && this.cookieService.get('orejime')[CAPTCHA_NAME] &&
109109
recaptchaKeyRD.hasSucceeded && recaptchaVersionRD.hasSucceeded &&
110110
isNotEmpty(recaptchaVersionRD.payload?.values) && isNotEmpty(recaptchaKeyRD.payload?.values)
111111
) {

src/app/register-email-form/register-email-form.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export class RegisterEmailFormComponent implements OnDestroy, OnInit {
247247
* Return true if the user has accepted the required cookies for reCaptcha
248248
*/
249249
isRecaptchaCookieAccepted(): boolean {
250-
const orejimeAnonymousCookie = this.cookieService.get('orejime-anonymous');
250+
const orejimeAnonymousCookie = this.cookieService.get('orejime');
251251
return isNotEmpty(orejimeAnonymousCookie) ? orejimeAnonymousCookie[CAPTCHA_NAME] : false;
252252
}
253253

src/app/shared/cookies/orejime-configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { NativeWindowRef } from '../../core/services/window.service';
1515
*/
1616
export const HAS_AGREED_END_USER = 'dsHasAgreedEndUser';
1717

18-
export const ANONYMOUS_STORAGE_NAME_OREJIME = 'orejime-anonymous';
18+
export const ANONYMOUS_STORAGE_NAME_OREJIME = 'orejime';
1919

2020
export const GOOGLE_ANALYTICS_OREJIME_KEY = 'google-analytics';
2121

src/styles/_custom_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,6 @@
148148
--ds-process-overview-table-info-column-width: 250px;
149149
--ds-process-overview-table-actions-column-width: 80px;
150150

151-
--green1: #1FB300; // This variable represents the success color for the Orejime cookie banner
151+
--green1: #1c710a; // This variable represents the success color for the Orejime cookie banner
152152
--button-text-color-cookie: #fff; // This variable represents the text color for buttons in the Orejime cookie banner
153153
}

src/styles/_global-styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ body {
5656
}
5757

5858
a {
59-
color: var(--green1);
59+
color: var(--bs-white);
6060
}
6161
}
6262

0 commit comments

Comments
 (0)