test: adjust karma global state mock

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2025-06-10 15:17:13 +02:00
parent c3e66e22c7
commit f1b3fac3b1
No known key found for this signature in database
GPG key ID: 45FAE7268762B400

View file

@ -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() {