[DURACOM-309] disable orejime during e2e tests

This commit is contained in:
Andrea Barbasso
2025-04-14 11:19:48 +02:00
committed by FrancescoMolinaro
parent d423f82324
commit ea265075c8
2 changed files with 7 additions and 5 deletions

View File

@@ -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);

View File

@@ -191,11 +191,13 @@ export class BrowserOrejimeService extends OrejimeService {
*/
this.translateConfiguration();
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);
});
});