diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts index 48985e7911..1dfc4ff8b4 100644 --- a/cypress/support/e2e.ts +++ b/cypress/support/e2e.ts @@ -56,7 +56,7 @@ before(() => { beforeEach(() => { // Pre-agree to all Orejime cookies by setting the orejime-anonymous cookie // This just ensures it doesn't get in the way of matching other objects in the page. - cy.setCookie('orejime-anonymous', '{"authentication":true,"preferences":true,"acknowledgement":true,"google-analytics":true}'); + cy.setCookie('orejime-anonymous', '{"authentication":true,"preferences":true,"acknowledgement":true,"google-analytics":true,"correlation-id":true}'); // Remove any CSRF cookies saved from prior tests cy.clearCookie(DSPACE_XSRF_COOKIE); diff --git a/src/app/shared/cookies/browser-orejime.service.ts b/src/app/shared/cookies/browser-orejime.service.ts index db29a9e7a2..1691d39a87 100644 --- a/src/app/shared/cookies/browser-orejime.service.ts +++ b/src/app/shared/cookies/browser-orejime.service.ts @@ -191,11 +191,13 @@ export class BrowserOrejimeService extends OrejimeService { */ this.translateConfiguration(); - this.orejimeConfig.apps = this.filterConfigApps(appsToHide); - + if (this._window?.nativeWindow?.Cypress) { + this.orejimeConfig.apps = []; + } else { + this.orejimeConfig.apps = this.filterConfigApps(appsToHide); + } this.applyUpdateSettingsCallbackToApps(user); - - void this.lazyOrejime.then(({ init }) => { + this.lazyOrejime.then(({ init }) => { this.orejimeInstance = init(this.orejimeConfig); }); });