mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[DURACOM-309] disable orejime during e2e tests
This commit is contained in:

committed by
FrancescoMolinaro

parent
d423f82324
commit
ea265075c8
@@ -56,7 +56,7 @@ before(() => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
// Pre-agree to all Orejime cookies by setting the orejime-anonymous cookie
|
// 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.
|
// 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
|
// Remove any CSRF cookies saved from prior tests
|
||||||
cy.clearCookie(DSPACE_XSRF_COOKIE);
|
cy.clearCookie(DSPACE_XSRF_COOKIE);
|
||||||
|
@@ -191,11 +191,13 @@ export class BrowserOrejimeService extends OrejimeService {
|
|||||||
*/
|
*/
|
||||||
this.translateConfiguration();
|
this.translateConfiguration();
|
||||||
|
|
||||||
|
if (this._window?.nativeWindow?.Cypress) {
|
||||||
|
this.orejimeConfig.apps = [];
|
||||||
|
} else {
|
||||||
this.orejimeConfig.apps = this.filterConfigApps(appsToHide);
|
this.orejimeConfig.apps = this.filterConfigApps(appsToHide);
|
||||||
|
}
|
||||||
this.applyUpdateSettingsCallbackToApps(user);
|
this.applyUpdateSettingsCallbackToApps(user);
|
||||||
|
this.lazyOrejime.then(({ init }) => {
|
||||||
void this.lazyOrejime.then(({ init }) => {
|
|
||||||
this.orejimeInstance = init(this.orejimeConfig);
|
this.orejimeInstance = init(this.orejimeConfig);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user