test: adjust karma global state mock

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/53521/head
Ferdinand Thiessen 2025-06-10 15:17:13 +07:00
parent fdfc346572
commit ed717d3d2d
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
1 changed files with 7 additions and 0 deletions

@ -85,6 +85,9 @@ window._oc_appswebroots = {
"files": window.webroot + '/apps/files/',
"files_sharing": window.webroot + '/apps/files_sharing/'
};
window.OC ??= {};
OC.config = {
session_lifetime: 600 * 1000,
session_keepalive: false,
@ -111,6 +114,10 @@ window.Snap.prototype = {
window.isPhantom = /phantom/i.test(navigator.userAgent);
document.documentElement.lang = navigator.language;
const el = document.createElement('input');
el.id = 'initial-state-core-config';
el.value = btoa(JSON.stringify(window.OC.config))
document.body.append(el);
// global setup for all tests
(function setupTests() {